What is hreflang?
Hreflang is an HTML attribute (rel="alternate" hreflang="x") that tells Google a page's language and regional target. It is used on international sites to ensure each locale sees the correct language version in search results.
How hreflang implementation works
Implementing hreflang requires every page in a language cluster to link to every other variant in that cluster, and to include an x-default tag for the fallback URL. Common errors include missing return tags, incorrect locale codes, and pointing to redirects rather than canonical URLs.
Hreflang is complex to implement at scale and is one of the most error-prone areas of technical SEO. A site with 10 language variants and 500 pages has 5,000 individual hreflang relationships to maintain.
Example
Example
A site with English (US), English (UK), and Spanish (Mexico) versions uses hreflang to ensure US visitors see /en-us/page/, UK visitors see /en-gb/page/, and Mexican visitors see /es-mx/page/.
Frequently asked questions
What is the most common hreflang mistake?
Missing return tags. Every page in a language cluster must reference every other variant, and each variant must reference back. One-directional annotations are ignored entirely.
Does hreflang affect rankings?
It does not boost rankings; it routes them. Hreflang ensures the right language or regional version appears for each user, preventing the German page from outranking the French one in France.