An editor linking four language versions of a page, one return link broken

By Selim Aydin ·

The Rules Behind a Valid Hreflang Cluster

Hreflang is one line per language on every page, and most of what goes wrong is the tags contradicting each other. The checker reports the contradictions; this page explains what each one means and what the tags should look like.

What Hreflang Does and What It Does Not

An hreflang annotation tells a search engine that a page has other versions for other languages or regions, and where they are. Google uses it to swap the result it shows: a searcher in Germany typing a query gets the German page instead of the English one, even when the English page has more links. It is a hint about equivalence, not a ranking signal and not a translation mechanism. The pages must already exist and must be real equivalents of each other.

It also does not replace a canonical tag, a sitemap or a redirect. A visitor who lands on the wrong language is not redirected by hreflang; the search result is what changes. Redirecting by browser language on top of hreflang is a separate decision and a risky one, because it tends to redirect Googlebot too.

The Five Rules

  1. Every page lists every version, including itself. Four languages means four link elements on each of the four pages: the same set, everywhere.
  2. Every link has a return link. If A points at B, B points at A. Google verifies this and ignores any pair where it fails; Search Console reports it as "no return tags".
  3. URLs are absolute and final. https://example.com/de/, not /de/, and not a URL that redirects, is noindex, or answers anything other than 200.
  4. Codes are real. Language in ISO 639-1 (de), optional script in ISO 15924 (zh-Hant), optional region in ISO 3166-1 alpha-2 (de-AT). Region alone is not allowed.
  5. Each page is its own canonical. A canonical pointing at another URL tells Google this page is a duplicate, and duplicates lose their hreflang.

The snippet

<link rel="canonical" href="https://example.com/de/pricing/">
<link rel="alternate" hreflang="en" href="https://example.com/pricing/">
<link rel="alternate" hreflang="de" href="https://example.com/de/pricing/">
<link rel="alternate" hreflang="fr" href="https://example.com/fr/pricing/">
<link rel="alternate" hreflang="x-default" href="https://example.com/pricing/">

That block, with only the canonical changing, goes on all three pages. The canonical is self-referencing on each one; the alternate set is identical.

x-default

x-default names the page to show when no listed language matches the searcher. On most sites that is the English page or a language-picker page. It is optional, and it is fine for it to be the same URL as one of the language versions. What is not fine is declaring it on some pages of a cluster and not others, or pointing it at different URLs from different pages; the checker reports both.

Language, Script and Region Codes

ValueMeaningValid
enEnglish, any regionyes
en-GBEnglish, United Kingdomyes
en-UKUK is not a region codeno, use en-GB
en_USunderscore instead of hyphenno, use en-US
en-EUEU is not a countryno, use en or list countries
zh-HansChinese, simplified scriptyes
zh-Hant-TWChinese, traditional script, Taiwanyes
pt-BRPortuguese, Brazilyes
brBreton (a language), not Brazilvalid but almost never intended
ukUkrainian (a language), not the UKvalid but often a mistake
jpnot a language; Japanese is jano
GBregion with no languageno
x-defaultfallback for unmatched languagesyes

Google matches codes case-insensitively, so EN-gb works, but consistency helps every other tool that reads the tags. The conventional form is lower-case language, title-case script, upper-case region.

Three Places to Put the Tags

HTML link elements in the head are the default and the easiest to check. HTTP Link headers carry the same information for non-HTML files such as PDFs, written as Link: <https://example.com/doc.pdf>; rel="alternate"; hreflang="en", one per version, comma separated. XML sitemaps use xhtml:link elements inside each url entry, which suits sites with thousands of pages because the cluster is declared once per URL in a file you generate anyway. Pick one. When a page has tags in two places and they disagree, the checker flags the conflict, and Google's behaviour is not documented beyond "may ignore".

Canonicals and Hreflang Together

The interaction that breaks most international sites: a CMS or plugin sets the canonical of every translation to the original language, on the theory that translations are duplicates. To Google that is exactly what it means, so the translations are folded into the original and their hreflang is discarded, and the site appears in one language everywhere. The fix is mechanical: every language version canonicalises to itself. The other direction is also worth checking: a canonical pointing at a URL with parameters stripped is fine as long as the hreflang tags point at that same stripped URL, not at the parameterised one.

Reading the Report

The per-page table shows each URL's status, canonical state, its hreflang tags with the verdict for each target (links back, no return link, redirects, noindex, HTTP error) and a count of findings. Alternates found on your pages but not in your list are fetched too, marked "discovered", so return links can be verified without pasting the whole cluster. The four sections below the table hold the findings grouped by type, and the clusters section shows which pages ended up connected and whether each group is complete. Fix the errors, redeploy, and paste the same list again; the report has no memory, which means it also has no stale cache.

Questions People Ask About Hreflang

What is an hreflang tag?

An hreflang tag is a link element that tells search engines which language and region a page is for and where the other language versions of the same page live. Google uses it to show the right version to the right searcher instead of treating the translations as duplicates.

Does every page need to link to itself with hreflang?

Yes. Each page in a cluster lists every version including its own URL. A page that lists the others but not itself is a common cause of the tags being ignored.

What is a return link, and why does Google require it?

If page A declares page B as its French version, page B must declare page A as its English version. Without that return link Google cannot trust the claim, since anyone could point hreflang at a site they do not own, so it drops the pair.

Where should x-default point?

At the page a visitor should get when none of the listed languages match: usually the English version or a language-selector page. It is optional, but a cluster without one leaves that choice to the search engine.

Is en-UK a valid hreflang value?

No. The region code for the United Kingdom is GB, so the value is en-GB. UK is not an ISO 3166-1 code. Google ignores tags with invalid codes rather than guessing.

Can a page with a canonical to another URL still use hreflang?

Not usefully. A canonical tells Google the page is a duplicate of another URL, and duplicates are dropped from the index along with their hreflang. Every language version in a cluster must be its own canonical.

Should hreflang go in the HTML, the HTTP header or the sitemap?

Any one of the three works, and they should not be mixed. HTML link tags are the usual choice, the Link header suits PDFs and other non-HTML files, and the sitemap keeps large sites manageable because the tags live in one place instead of on every page.