Hreflang
Hreflang is an annotation that tells search engines which language and regional versions of a page exist, so each user gets the right version in search results. It prevents, for example, Belgian searchers from landing on the Dutch version of a page.
Hreflang is an attribute used on sites that publish the same content in several languages or for several countries. It tells Google that page A is the Dutch version for the Netherlands, page B the Dutch version for Belgium and page C the French version for Belgium, and that they belong together. Google then tries to show each searcher the version that fits their language and location.
How the values work. Each annotation uses a language code in ISO 639-1 format (nl, de, fr), optionally followed by a region code in ISO 3166-1 alpha-2 format (nl-BE, de-AT, fr-CH). A region on its own is not valid, so "be" alone does not mean Belgium. The special value x-default marks the fallback page for users who match none of the listed versions, often a language selector or the international English version.
Three ways to implement it:
- Link elements in the HTML head of every version.
- Link entries in the HTTP header, useful for PDFs and other non-HTML files.
- Annotations in the XML sitemap, often the easiest option for large sites with many language versions.
Pick one method per set of pages. Mixing them makes errors harder to find.
The rules that trip people up:
- Return links. Annotations must be reciprocal. If page A points to page B, page B must point back to page A, or Google may ignore the pair.
- Self-reference. Each page should list itself as well as all its alternatives.
- Canonical URLs only. Every URL in a hreflang set should be indexable, return a 200 status and canonicalise to itself. Pointing to redirects or to pages with a canonical elsewhere breaks the set.
- Correct codes. en-UK is wrong (the code is en-GB), and so is using a country code in the language position.
What hreflang is not. It is not a ranking boost and it does not stop duplicate content from being an issue by itself. It is a signal that helps Google swap in the right URL for the right user. It also does not replace good localisation: translated pages with prices, contact details and examples for the target market tend to perform better than machine-translated copies. Google does not use the HTML lang attribute for this purpose, and Bing has said it relies more on other signals such as the content-language meta tag.
Checking your setup. Crawl the site with an SEO crawler that reports missing return links and invalid codes, and check in Google Search Console whether the right country versions get impressions in the right markets. If Dutch users keep seeing your Belgian page, the annotations or the canonicals are usually the cause.
For sites that sell or publish across several European markets, getting hreflang right is often the difference between one strong version per market and versions competing with each other.
Questions about Hreflang
Is hreflang a ranking factor?
No. It does not make a page rank higher; it helps Google show the correct language or country version of a page that would rank anyway.
What does x-default mean in hreflang?
It marks the fallback page for users whose language or region is not covered by any of your other versions, often an international homepage or language selector.
Do I need hreflang if my sites use different country domains?
It still helps when the content is similar, such as a .nl and a .be site in Dutch. For clearly different languages on separate domains it matters less, but it does no harm.