What is hreflang?
Hreflang is an HTML attribute that tells search engines which language and country a page is meant for and which other language versions of that page exist. Google uses hreflang to show visitors the version that fits their language or region, for example a British or an American English page.
Why is hreflang important?
- The right version in search results: visitors in the UK see the British page, visitors in the US see the American one.
- Less confusion between near-identical pages: search engines see that the versions belong together.
- Better experience: fewer visitors land on a page in the wrong language or with the wrong prices.
Examples of hreflang
<link rel="alternate" hreflang="en-gb" href="https://example.com/uk/" />for the UK<link rel="alternate" hreflang="en-us" href="https://example.com/us/" />for the US<link rel="alternate" hreflang="x-default" href="https://example.com/" />for visitors who match neither
How do you use hreflang?
On every language version, add hreflang references to all versions, including the page itself, plus an x-default. The references must be reciprocal, or Google ignores them. You can place them in the HTML, in the HTTP header or in the sitemap (international SEO).