Common hreflang Mistakes and How to Fix Them

By the ResilientLang team · Published · 5 min read

Most hreflang problems come down to a short list: pages that do not link back to each other, invalid language or region codes, relative URLs, annotations that contradict the canonical tag, and alternates that cannot be indexed. Each one makes Google ignore or misread the annotation. All are detectable with a crawl of your own site and a few lines of script.

Why does hreflang fail so often?

hreflang is a graph, not a single tag. A group of N versions needs N pages that each list N URLs, all consistent. A single wrong entry on one page can break a pair. Because the lists are generated by templates, plugins or sitemap scripts, one bug repeats thousands of times. The rules below come from Google's documentation on localized versions, which is the reference for what Google does; Bing's behaviour is less precisely documented.

Google's documentation says that if two pages do not both point to each other, the tags will be ignored. This is the most reported error.

<!-- https://example.com/de/preise/ (declares the English page) -->
<link rel="alternate" hreflang="en" href="https://example.com/en/pricing/" />

<!-- https://example.com/en/pricing/ declares nothing back: the pair is ignored -->

Find it: crawl every page, extract the alternates, and verify that for every A pointing to B there is a B pointing to A.

Fix: generate the complete group from one dataset, so every member outputs the identical list. Also confirm the page lists itself; Google says each version must include itself.

Mistake 2: Invalid or mistaken language and region codes

Google supports ISO 639-1 language codes and ISO 3166-1 Alpha 2 region codes, with an optional script such as zh-Hant. Typical errors:

Wrong Why Right
en-UK UK is not the ISO code en-GB
GB A region cannot be given alone en-GB
be for Belgium be is the Belarusian language nl-BE or fr-BE
gb-en Wrong order en-GB
eng, english Not ISO 639-1 en
es-419 Google says it is not supported es

See language and region codes for a longer reference. Underscores such as en_GB are also not the documented format; use a hyphen.

Find it: validate every value against allow-lists of ISO codes in your crawl script.

Mistake 3: Relative or protocol-relative URLs

Google states that alternate URLs must be fully-qualified, including http or https.

<!-- Wrong -->
<link rel="alternate" hreflang="fr" href="/fr/" />
<link rel="alternate" hreflang="fr" href="//example.com/fr/" />

<!-- Right -->
<link rel="alternate" hreflang="fr" href="https://example.com/fr/" />

Fix: in templates, build the URL from a configured site base URL, never from the current request path alone. Behind a proxy or CDN, check that the generated host and scheme are the public ones and not an internal hostname.

Mistake 4: Conflicts with canonical tags

hreflang and rel="canonical" must agree. Google's canonicalization documentation says language and country versions should use rel="alternate" with hreflang, and that for localized pages you should specify a canonical page in the same language. The common failures are:

  • Every language version is canonical to the English page. Google reads this as "the translations are duplicates of English", and the hreflang annotation then points at pages you asked it not to index.
  • The hreflang href differs from the page's canonical, for example one has a trailing slash and the other does not, or one has query parameters.
  • The canonical points to a different protocol or host than the hreflang URLs.
<!-- French page: correct -->
<link rel="canonical" href="https://example.com/fr/tarifs/" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/tarifs/" />
<link rel="alternate" hreflang="en" href="https://example.com/en/pricing/" />

Fix: make every version self-canonical and make the hreflang URL equal to that canonical URL, character for character. The full interaction is explained in canonical tags on multilingual sites.

Mistake 5: Targets that cannot be indexed

An hreflang entry is only useful if the target can be shown in search. Problems to check on each alternate:

  • It redirects (3xx) to another URL. Point the annotation at the final URL instead.
  • It returns 404, 410 or a server error.
  • It is blocked by robots.txt, so Google cannot read its return links.
  • It carries noindex in a meta tag or X-Robots-Tag header.
  • It is behind a login or a geographic redirect that sends crawlers elsewhere.

Find it: request every URL in your hreflang graph and record status code, final URL, robots status and indexability. This is the same check you would run for a sitemap.

Mistake 6: Inconsistent sets across pages

Even when every pair is linked, groups can be incomplete. Page A lists English, French and German, but page B lists only English and French, so German is never confirmed from B. Another variant is annotating only pages that have a translation while an untranslated page quietly lists a language that does not exist for it. Annotate only real alternates, and omit a language for pages without a translation; do not point it at the home page.

Mistake 7: Mixing methods with conflicting data

Google says you can use HTML tags, headers and sitemaps together but there is no benefit in Search. If you do, any difference between them is a conflict you will have to debug. Keep one source of truth; see hreflang implementation methods.

Mistake 8: Auto-redirecting by language or location

If a visitor to / is automatically redirected based on guessed language, crawlers may never see the other versions. Google advises against automatically redirecting users based on your guess of their language, and recommends linking to the other versions so users can choose. Use x-default for the selector or fallback page. More in auto-redirect by language or location.

How do you audit hreflang at scale?

A simple process that works for most sites:

  1. Crawl all URLs listed in your sitemap or from your navigation.
  2. Extract canonical, robots directives, status code and all hreflang entries per URL, from HTML, headers and the sitemap.
  3. Build a map from URL to its declared alternates.
  4. Report: missing self-reference, missing return links, invalid codes, non-absolute URLs, non-200 targets, noindex targets, canonical not equal to self, and sets that differ within a group.
  5. Compare the report with Google Search Console's International Targeting or indexing reports where available, remembering that report availability and names change.

We are building ResilientLang with this kind of generated, consistent output in mind, but it is not released, so use a crawler of your choice today.

Key takeaways

  • hreflang fails when pairs are not reciprocal; Google ignores annotations without return links.
  • Use ISO 639-1 language and ISO 3166-1 Alpha 2 region codes: en-GB, not en-UK.
  • Always use fully-qualified URLs that match each page's canonical exactly.
  • Make each language version self-canonical; never canonicalize translations to the English page.
  • Every alternate must return 200, be crawlable and be indexable.
  • Audit with a crawl after every migration, slug change or plugin update.

Sources

Frequently asked questions

Why is Google ignoring my hreflang tags?

The most common causes are missing return links, a wrong or invalid language or region code, relative URLs, and targets that redirect, return errors, are blocked or are marked noindex. Google says annotations are ignored when two pages do not point to each other. Check each pair and each target URL.

Is hreflang="en-UK" valid?

No. The ISO 3166-1 Alpha 2 code for the United Kingdom is GB, so the correct value is en-GB. Google's documentation says reserved or unofficial codes such as UK have no effect. A region code cannot stand alone either, so use en-GB rather than GB.

Should the canonical point to the English page on every language version?

No. Each language version should normally be canonical to itself. Google's guidance for localized pages is to specify a canonical page in the same language. Pointing every version at English tells Google to treat the translations as duplicates and can cause them to drop out.

How often should I audit hreflang?

Audit after any migration, URL change, plugin update or new language launch, and spot-check regularly otherwise. Templates and caches generate these tags, so errors usually appear after a change rather than at random. A scripted check that crawls your own pages is cheap to run.

Keep reading