hreflang

hreflang is an annotation that tells Google which pages are language or regional versions of each other, so searchers get the right one. The basic rules.

hreflang is an annotation that tells Google which URLs are language or regional versions of the same page. With it, Google Search can point each searcher to the version that fits their language or region, for example the German article for someone searching in German.

You can add it in three ways, which Google treats as equivalent: link elements in the head of each page, HTTP headers, or entries in your sitemap. Pick one.

The rules that matter most:

  • each version lists itself and every other version, so the set is identical on all of them;
  • links must go both ways, or Google may ignore them;
  • URLs must be complete, including https://;
  • codes use an ISO 639-1 language, optionally followed by an ISO 3166-1 Alpha 2 region, such as de or en-GB;
  • x-default marks the fallback page for searchers whose language doesn't match any version.

hreflang doesn't tell Google what language a page is in. Google determines that from the visible content. It also doesn't turn translations into duplicates: Google says localized versions count as duplicates only if the main content stays untranslated.

Related terms

Sources

  1. Tell Google about localized versions of your page
  2. Managing multi-regional and multilingual sites

All terms