Hreflang

Hreflang is an HTML attribute that tells search engines which language and region a page is written for, so the right version is served to the right audience. It only works when every version points back at every other version, including itself, which is where most implementations fail.

Last reviewed

How the annotation works

Each page lists every language version of itself, including itself, using a language code and optionally a region: en, en-gb, de-ch. A page that lists others without being listed by them in return is ignored.

The maths is why this gets out of hand. Four languages across eight markets is not twelve annotations, it is every version referencing every other version, and the count grows with the square of the combinations.

The failures, what they look like, and the fix
MistakeSymptomFix
Missing return linksThe whole cluster is ignoredEvery version lists every version, itself included
Invalid region codeAnnotation silently droppedUse ISO codes; en-eu is not one
Pointing at redirectsSignals dilutedReference the final URL
No x-defaultWrong version served to unlisted marketsAdd an x-default fallback
Conflicts with canonicalEngine ignores bothEach version canonicalises to itself

The failures that actually happen

  • Missing return links, so the whole cluster is discarded
  • Invented region codes, such as en-eu, which is not a valid region
  • Pointing at URLs that redirect rather than at the final address
  • No x-default for visitors who match no version
  • Annotations that disagree with the canonical tags on the same pages

At enterprise scale

On Klipboard's global rebrand we generated 6,082 hreflang annotations across four languages and eight markets. At that volume the tags cannot be written by hand: they have to be produced from the CMS so that adding a page or a locale cannot break the return links.

Why it matters for B2B marketing teams

If you are running more than two locales, hand-maintained hreflang will break, and it will break silently. The only version that survives a growing site is one generated from the CMS, so adding a page or a market cannot orphan a cluster.

Frequently asked questions

Do I need hreflang for the same language in different countries?+

Yes, when the content genuinely differs by market, such as pricing, currency, or legal terms. Use en-gb and en-us to distinguish them. If two pages are identical, consolidate them with a canonical tag instead.

What does x-default do?+

It names the fallback version for users whose language and region match none of your alternatives. Usually the international or English page. Without it, search engines guess, and often guess wrong for visitors outside your listed markets.

Related terms

←Back to Glossary