← All posts
Findability · International SEO · hreflang

What is hreflang, and how does it hide a page from its own audience?

Hreflang is a set of annotations, placed in a page's head, in its HTTP response headers, or in an XML sitemap, that tells a search engine which language or country version of a page to show a given visitor. It fails quietly: a page can carry a hreflang tag that reads as correct and still be invisible to the audience it names, because what an engine checks is whether every page in the cluster points back at every other one, not whether one tag by itself looks clean.

What does hreflang actually do?

A hreflang cluster is a set of equivalent pages in different languages or regions, each one declaring the whole set through its own hreflang annotations. An engine uses the cluster to decide which page to show a visitor searching from a given country in a given language, instead of relying on wherever each page happens to rank on its own.

One-way pointer
The German page names the French page as an alternate
de-DE → fr-FRfr-FR → nothing
vs
Return link
Each page names the other back, so the pair is reciprocal
de-DE → fr-FRfr-FR → de-DE
An engine reads hreflang as a pair, not a one-way pointer. A page that names an alternate but is never named back is read as unreciprocated.

A hreflang annotation only counts when it is reciprocated: if the German page names the French page as an alternate, the French page has to name the German page back, or the pair is dropped for both. Most hreflang failures are one of five mistakes, and every one of them looks identical in the page's raw source, a tag that is present and still does nothing.

MistakeWhat actually happensThe fix
No return linkThe alternate is ignored for both pages; engines fall back to their ordinary ranking signals alone.Add the reciprocal tag on every page in the cluster, not only the one that started it.
Self-reference missingA page omits a hreflang entry pointing at itself, which several engines read as a broken cluster.Every page in the set declares an entry for itself, in its own locale, alongside the others.
Invalid or swapped codeThe engine cannot resolve the value, so the whole annotation on that line is dropped.Language first, region second (fr-FR, not FR-fr), each checked against its own standard.
x-default miscast as a localeNo fallback is served to a visitor outside the cluster, or the fallback is treated as a target in its own right.Declare x-default once per cluster, pointed at the page meant for everyone the cluster does not name.
Hreflang disagrees with canonicalThe canonical tag asks the engine to prefer a different URL than the one hreflang just named, so the alternate loses to its own canonical.Point each page's canonical at itself, never at another locale in the same cluster.

Each of the five reads as a working annotation in the page's raw source. Only a reciprocal check across the cluster catches them.

Five hreflang mistakes that look like a working annotation and are not one.

Is a valid language and region code the same as the right page?

No. A code can be perfectly well formed under the standard it follows and still point at the wrong content, because validity and correctness are two different questions.

What does a correct hreflang block actually look like?

Every page in the cluster carries the same set of lines: one entry per locale in the cluster, including an entry for itself, plus a single x-default for the visitor the cluster does not name.

<head> on the US page
<link rel="alternate" hreflang="en-us"
      href="https://example.com/" />
<link rel="alternate" hreflang="en-gb"
      href="https://example.com/uk/" />
<link rel="alternate" hreflang="de-de"
      href="https://example.com/de/" />
<link rel="alternate" hreflang="x-default"
      href="https://example.com/" />

This block repeats on the UK and German pages too, each one swapping in its own URL for the self-reference line. x-default appears once per cluster, not once per locale.

This block, shown on the US page, repeats on the UK and German pages too, each one swapping in its own URL for the self-reference line.

How much of a hreflang cluster actually gets checked?

  • Validity, against two real standards. Language codes are checked against ISO 639-1 and region codes against the officially assigned ISO 3166-1 Alpha-2 list; a script subtag such as Hant is parsed and accepted without being checked further.
  • x-default, counted on its own. It is excluded from the return-link rate and judged separately, because a fallback page is not required to point back at every locale that names it.
  • A cap on how many alternates get fetched. Checking whether an alternate actually returns, rather than noindexing or canonicalising itself away, means fetching it, and that is capped per audit; anything past the cap is reported as unchecked, never as passing.
  • A single-market site is not a failure. A site that shows fewer than two locale signals gets the whole section reported as not applicable, which is the correct read for a site that was never meant to be international, not a missing feature.

How do you check hreflang on your own site in five minutes?

  1. View the page's source and search for `hreflang=` to see the raw annotations, not a browser's rendered view, since some of them arrive only in the HTTP response headers or the XML sitemap.
  2. Pick one locale pair from the cluster and open both pages. Confirm each one names the other, not just that each one names something.
  3. Check the x-default entry on its own. It should point at one page meant for everyone the cluster does not name, and it should appear exactly once per cluster, not once per locale.
  4. Compare the hreflang set against the page's own canonical tag. A page whose canonical points at a different locale in the same cluster is telling the engine to prefer that page over itself.
  5. Run a free AI visibility check of the homepage. It reads hreflang from the served HTML, the response headers and the sitemap, and reports cluster structure, code validity and alternate health as three separate checks.

Hreflang FAQ

Does hreflang affect rankings directly?

Not as a ranking factor on its own. It is a targeting signal: it tells an engine which version of a page to show a given visitor, among pages that already qualify to rank. A missing or broken annotation does not lower a page's ranking; it can show the wrong page to the wrong audience, or show no page from the cluster at all if an engine cannot resolve it.

Do I need hreflang if my site only has one language?

No. Hreflang exists to tell an engine which of several equivalent pages to show. A single-market, single-language site has nothing to choose between, so the correct result is that the check does not apply, not that something is missing.

Can hreflang live in the sitemap instead of the page head?

Yes. Hreflang can be declared in the page's head markup, in the HTTP response headers, or as entries inside an XML sitemap, and large sites often prefer the sitemap because it avoids repeating the same block on every page. All three sources are read the same way: an annotation only counts once its pair is confirmed reciprocal.

Auditaar reads hreflang from the served HTML, the response headers and the XML sitemap, and checks it three ways: cluster structure and return links, language and region code validity, and alternate health on the alternates it fetches. Run a free AI visibility check, or read the top technical SEO mistakes.

See it on your own site

Auditaar turns a single URL into a scored, sourced, ordered plan across all six pillars, AI Visibility included.

Free AI visibility check. No sign-up required.

Related reading