Lesson 22 / 32

International SEO & Hreflang

Serve the right language and region to users and search engines.

Multi-language site structure

Two common approaches: subdirectory (example.com/en/, example.com/fr/) or subdomain (en.example.com, fr.example.com). Subdirectories consolidate link authority; subdomains keep language versions separate.

Hreflang markup

Use hreflang tags to tell Google the relationship between language versions. Include an x-default version for users whose language doesn't match.

<!-- English page (US) -->
<head>
  <link rel="alternate" hreflang="en-US" href="https://example.com/en/" >
  <link rel="alternate" hreflang="en-GB" href="https://example.com/en-gb/" >
  <link rel="alternate" hreflang="es" href="https://example.com/es/" >
  <link rel="alternate" hreflang="fr" href="https://example.com/fr/" >
  <link rel="alternate" hreflang="x-default" href="https://example.com/" >
</head>

<!-- Spanish page -->
<head>
  <link rel="alternate" hreflang="en-US" href="https://example.com/en/" >
  <link rel="alternate" hreflang="es" href="https://example.com/es/" >
  <link rel="alternate" hreflang="x-default" href="https://example.com/" >
</head>