Hreflang is an HTML attribute that tells search engines which language, and optionally which region, each version of a page is meant for, so the right version shows to the right searchers.
It is used on sites with the same content in several languages, such as English and French pages for Canada, or with regional versions in the same language, such as separate pages for Canada, the United States and the UAE.
How hreflang looks
Each version lists itself and all its alternates, for example:
- link rel=”alternate” hreflang=”en-ca” href=”https://example.com/ca/”
- link rel=”alternate” hreflang=”fr-ca” href=”https://example.com/ca-fr/”
- link rel=”alternate” hreflang=”en-us” href=”https://example.com/us/”
- link rel=”alternate” hreflang=”x-default” href=”https://example.com/”
The language code uses ISO 639-1, such as en or fr. The optional region uses ISO 3166-1 alpha-2, such as ca or us. x-default is the fallback for users who match none of the listed versions.
Where to add it
You can place hreflang in the page head, in HTTP headers (useful for PDFs) or in your XML sitemap. Use one method consistently.
Common mistakes
- Missing return links. If page A points to page B, page B must point back to A.
- Wrong codes, such as en-uk instead of en-gb, or a region without a language.
- Pointing hreflang at redirected, noindexed or non-canonical URLs.
- Combining hreflang with a Canonical Tag that points all versions to one page, which cancels the alternates.
Hreflang does not stop Duplicate Content filtering on its own, and it is a signal rather than a command. Our technical SEO team sets it up for multi-country sites.
FAQ
Do I need hreflang for a single-language site?
No. Hreflang only matters when you have multiple versions of the same content for different languages or regions.
Does Bing use hreflang?
Bing relies mainly on the content-language meta tag and other signals rather than hreflang.
