Digital Technology & Websites

Hreflang Implementation Guide for Multi-Region Websites

How to implement hreflang correctly: pick a method, use valid language and region codes, add return links and x-default, and avoid the errors that break it.

Hreflang annotations tell Google which language or regional version of a page to show to which users. To implement them correctly, choose one method, give every version the same complete set of annotations including itself, use valid language and region codes, and add an x-default fallback where it makes sense. Most failures come from missing return links and invalid codes.

What hreflang does and does not do

Hreflang links equivalent pages across languages and regions. It does not translate anything, and it does not guarantee which version appears. Google’s documentation on localized versions describes it as a way to tell Google about the variants of a page. Each variant should have its own URL; Google’s multi-regional guidance says to use different URLs for each language version and to link them with hreflang.

Before you add annotations, settle your URL structure. Google lists country-code domains, subdomains and subdirectories as options, with different trade-offs, and advises against URL parameters. For the redirect side of site changes, see URL structure and 301 redirects.

Choose one of three methods

Google treats all three equally, so pick the one you can maintain.

Method Best for Note
HTML link tags in the head Smaller sites with templated pages One tag per variant, including the page itself
HTTP Link header Non-HTML files such as PDFs Set at server level
XML sitemap entries Large sites Declare the xhtml namespace; each URL lists every variant

Using more than one method adds maintenance with no benefit.

The rules that matter

  1. Include every variant on every page. The set of annotations must be identical on each version, and each page lists itself.
  2. Make links reciprocal. If page A points to page B, B must point back to A. Google says that without return links the annotations may be ignored.
  3. Use absolute URLs. Fully qualified, with the protocol.
  4. Use valid codes. An ISO 639-1 language code, optionally followed by an ISO 3166-1 Alpha-2 region code, for example en-AU or zh-Hans. A region code on its own is invalid.
  5. Add x-default for a fallback. Use it for the page shown when no language matches, such as a country selector.
  6. Provide a generic language page where you have regional variants. If you have en-AU, en-GB and en-CA, offer a plain en for other English speakers.

Example in HTML

For an English-Australian page, a Simplified Chinese page and a fallback, each of the three pages would carry the same three tags in its head:

<link rel="alternate" hreflang="en-AU" href="https://example.com/au/" />
<link rel="alternate" hreflang="zh-Hans" href="https://example.com/zh/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />

The domain here is a placeholder. The point is that all pages share one identical block.

Common errors

  • Missing return links. The most frequent problem Google describes.
  • Invalid or reserved codes. Google notes that UK is ignored (use GB), that be means Belarusian rather than Belgium, and that codes such as es-419 are not supported.
  • Relative URLs. They fail the absolute URL requirement.
  • Pointing to redirected or blocked URLs. Annotate the final, indexable URL. Pages that are redirected, noindexed or returning errors cannot serve as valid alternates.
  • Mixed signals. A canonical tag pointing to a different language version fights the hreflang annotation. Each version should normally canonicalise to itself.
  • Automatic redirects by IP or language. Google advises against redirecting users automatically, because IP analysis is unreliable and Googlebot mostly crawls from the US without setting a language. Offer visible links so users can choose.
  • Half-translated pages. Mixed-language content on one URL sends confusing signals; use one language per page.

Test and maintain

  1. Crawl the site and export the annotations for each URL.
  2. Check that every annotation has a return link and that codes are valid.
  3. Check that all targets return a successful response and are indexable.
  4. Re-check after launching new pages, retiring pages or changing URLs.
  5. Remember that other search engines may use different signals; see search engines and platforms by region.

Hreflang only works if the content is genuinely localised. Translating a page word for word and adding annotations rarely satisfies searchers; start from keyword research in other languages.

Where Radiance Impact fits

Radiance Impact’s Technology division builds business websites, including multi-language structures, and the Global team supports localisation. See Technology or contact us.

Sources