Hreflang explained: showing the right page in each country and language
What hreflang does and does not do, how to implement it correctly, and the mistakes that make search engines ignore it.
· 2 min read
If a site has versions of a page for different languages or regions, hreflang tells search engines about them, so a searcher in Germany sees the German page and a searcher in the UK sees the English one for the UK.
What hreflang does and does not do
- It does help Google show the right language or regional version of a page in its results.
- It does not make a page rank higher, and it is not needed for a site in a single language.
- It does not stop duplicate content being a problem by itself: each version should still be genuinely written for its audience.
How to write it
Each version lists every version of the page, including itself, with a language code and optionally a region code:
<link rel="alternate" hreflang="en-gb" href="https://example.com/uk/" />
<link rel="alternate" hreflang="en-us" href="https://example.com/us/" />
<link rel="alternate" hreflang="de" href="https://example.com/de/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
- Language codes use ISO 639-1 (
en,de,fr); region codes use ISO 3166-1 alpha-2 (gb,us,de). Useen-gb, noten-uk. - x-default names the page to show when no version matches, often a language selector or the main version.
- The tags can go in the HTML
<head>, in HTTP headers (useful for PDFs), or in the XML sitemap. Use one method consistently.
The rules that trip people up
- Return links are required. If the UK page points to the German page, the German page must point back to the UK page. Without the return link, the annotation may be ignored.
- Use full URLs that return a 200 status and are indexable. Do not point hreflang at redirects, noindex pages or pages whose canonical points elsewhere.
- Canonicals point to the page itself, not to another language version.
- Keep sets in sync. When you add or remove a version, update every page in the set.
Checking it
- Crawl the site with a crawler that reports hreflang, such as Screaming Frog or Sitebulb, to find missing return links, wrong codes and non-indexable targets.
- In Google Search Console, compare clicks by country to see whether each version is reaching its audience.
Alongside hreflang
Use clear URL structures for each version (subdirectories such as /de/, subdomains or country domains), write content for each market rather than only translating it, and avoid forcing visitors to a version by IP address: let them choose, and remember the choice.
Working on an international site? Ask in the Technical SEO community.