Hreflang Generator

Build a complete hreflang cluster with reciprocity checks and x-default handling. Paste one URL + language/region per line.

Hreflang Tags


              

Cluster Validation

What hreflang Does

hreflang tells search engines that several URLs are language or region variants of the same content, and each should be served to the appropriate audience. It does not consolidate ranking signals like a canonical does — each variant is indexed separately and ranks in its own market.

Format

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

The Reciprocity Rule

Every URL in a cluster must reference every other URL in the cluster, including itself. If page A points to page B but page B does not point back to A, Google discards the entire cluster. This is the most common hreflang failure — one forgotten self-referencing tag kills the entire cluster.

Language vs Region

  • en — English, any region. Use when you have one English page for all markets.
  • en-GB — English, specifically UK. Use when you have distinct UK and US pages.
  • en-US — English, specifically US.
  • x-default — the fallback page for users whose language/region isn't matched by any other tag.

Do Not Combine with Canonical

Each localised page should have a self-referencing canonical. Never point a French page's canonical at the English version — that removes the French page from the index entirely and defeats the purpose of hreflang.

Common Mistakes

  • Missing self-referencing tag — the #1 cause of ignored clusters.
  • Non-canonical URLs in the cluster — if /fr/ canonicalises to /en/, the hreflang is meaningless.
  • Wrong language codes — use ISO 639-1 for language (en, de) and ISO 3166-1 alpha-2 for region (GB, US).
  • Mixed protocols or hosts — all URLs must be absolute HTTPS on the same host.
  • Pages behind noindex — hreflang on a noindexed page is ignored.
  • Blocking the cluster in robots.txt — if Google can't crawl one member, the whole cluster can be dropped.

Implementation Methods

Three ways, in order of reliability:

  1. HTML link elements in <head> — simplest, most common.
  2. HTTP Link headers — for non-HTML files.
  3. XML sitemaps — using xhtml:link in <url> entries — best for large clusters.

Hreflang FAQ

Does hreflang consolidate ranking signals?

No. Each localised page is indexed and ranked independently in its target market. hreflang just ensures the right variant is served to the right user.

What happens if I forget the self-referencing tag?

Google discards the entire cluster. Always include a tag on each page that points back to itself as one of the alternates.

What is x-default?

The fallback page shown to users whose language/region isn't covered by any specific hreflang. Usually the primary site homepage.

Can I combine hreflang and canonical?

Yes — each localised URL should have a self-referencing canonical. Never canonicalise a locale to a different locale.