Send the right countryto the right page.
Hreflang is how you tell Google that your /us, /uk, and /fr pages are the same content for different audiences, so a Paris searcher lands on the French page instead of the dollar-priced one. Add a row per language-region, point each at its URL, and get a clean, valid block of link tags, with an x-default fallback and a lint that catches the reciprocity mistake that quietly breaks most setups.
Your versions
Version 1
Version 2
Version 3
Your hreflang block
<link rel="alternate" hreflang="en-US" href="https://example.com/us/" /> <link rel="alternate" hreflang="en-GB" href="https://example.com/uk/" /> <link rel="alternate" hreflang="fr-FR" href="https://example.com/fr/" /> <link rel="alternate" hreflang="x-default" href="https://example.com/" />
Paste this block into the <head> of every page in the set — the same block on all of them.
Lint
Valid
Every code is well-formed, every URL is absolute, and no code repeats. Confirm in Search Console's International Targeting report after it's live.
Reciprocal & self-referential
Paste this identical block into the <head> of every page in the set — including the page that points at itself. That satisfies both rules at once; a one-way or self-omitting set is invalid and dropped.
Your move
International SEO breaks in the gaps between pages, not on them.
A valid hreflang block for 3 versions plus x-default, ready to paste into every page in the set.
A perfect hreflang block does nothing if the canonical fights it, the sitemap contradicts it, or half your locale pages never got the tag. I audit the whole cluster — tags, canonicals, sitemaps, and what Search Console is actually indexing — and tell you exactly where the right country is getting the wrong page. Free call, and you keep the findings either way.
Plain English
One page, many audiences, no cannibalization.
Hreflang is an HTML attribute that maps each version of a page to the language and region it's meant for. When you sell the same thing to the US, the UK, and France, you end up with near-duplicate pages that compete in search and confuse the algorithm about which one to show where. Hreflang resolves that: it tells Google these pages are alternates of each other, and which user each one is for, so the British searcher gets pounds and the French searcher gets French.
The attribute value is a language code (ISO 639-1, like en or fr), optionally followed by a region code (ISO 3166-1 Alpha 2, like US or GB) — so en, en-US, en-GB, fr, fr-CA. Note the order: language first, then region, and the region is a country, never a continent. en-UK is wrong (the country code is GB); en-EU is invalid (EU is not a country). Get the code wrong and Google ignores the tag entirely.
Two rules trip up almost everyone. Hreflang must be self-referential: every page in the set must include a tag pointing at itself, not just at its siblings. And it must be reciprocal: if your English page points to the French page, the French page must point back. A one-way reference is invalid and gets dropped. This generator builds a single, complete block, self-reference included, that you paste into the <head> of every page in the cluster.
The formula
<link rel="alternate" hreflang="LANG-REGION" href="ABSOLUTE_URL" /> — one per version, plus x-default, on every page
A US/UK/French set needs four tags in the <head> of all three pages: hreflang="en-US" → /us, hreflang="en-GB" → /uk, hreflang="fr-FR" → /fr, and hreflang="x-default" → the page shown to everyone else. Each page lists all four — including a tag pointing at itself — and every reference is mirrored on the page it points to.
Your block got flagged. Here's why.
A code looks like en-UK or en-EU.
The region must be an ISO 3166-1 country code: GB, not UK; and there's no code for a continent. Use en-GB, and split en-EU into the actual countries you target.
The same code appears twice.
Each language-region can map to exactly one URL. Two rows with en-US conflict — Google can't pick, so it drops both. Merge them or differentiate the region.
There's no x-default row.
x-default is the page shown to users whose language-region you didn't specify. It's not required, but without it those visitors get assigned a version by guesswork. Add one pointing at your global or language-picker page.
A URL isn't absolute.
hreflang href must be a full, absolute URL with the protocol (https://…), not a relative path like /fr. Relative hrefs are ignored.
The set isn't reciprocal.
If page A lists page B, page B must list page A — and itself. Paste the SAME complete block into every page in the cluster; that satisfies both the self-reference and reciprocity rules at once.
How to ship hreflang that actually works
01Put the whole block on every page
The block this tool builds is the same for all pages in the set. Drop the identical block into the <head> of each version. That single move makes the set self-referential and reciprocal — the two rules that break most implementations.
02Use absolute URLs only
Every href must be a full https:// URL. Relative paths are silently ignored, which means Google sees a partial, non-reciprocal set and discards it.
03Get the code order and casing right
Language first, then region: en-US, not US-en. Language is ISO 639-1 (lowercase by convention), region is ISO 3166-1 Alpha 2 (uppercase). Google is case-insensitive, but consistency keeps your set auditable.
04Add an x-default
Point x-default at your language selector, your global homepage, or your most universal version. It's the catch-all for every audience you didn't name a tag for — including the search bots that don't match any locale.
05Don't mix it with the wrong canonical
Each page's canonical should point to itself, not to a single master language version. A cross-language canonical tells Google to ignore the alternates — it overrides your hreflang and collapses the set.
06Pick one delivery method
Hreflang can live in the HTML head, in the HTTP header (for PDFs and non-HTML), or in the XML sitemap. Use one method consistently across the set. Mixing or contradicting them is a common source of errors in Search Console.
The vocabulary
- Hreflang
- An attribute on a rel=alternate link tag that tells search engines which language and region a page version is for.
- x-default
- The special hreflang value for the fallback page shown to users whose language-region you haven't explicitly targeted.
- Self-referential
- Every page in a hreflang set must include a tag pointing at itself, not only at its alternates. Required for a valid set.
- Reciprocal
- If page A's hreflang references page B, page B must reference page A back. One-way references are invalid and dropped.
- ISO 639-1 / ISO 3166-1
- The standards hreflang uses: 639-1 for the two-letter language code (en, fr), 3166-1 Alpha 2 for the two-letter country code (US, GB).
Hreflang questions, straight answers
The format is <link rel="alternate" hreflang="LANG-REGION" href="ABSOLUTE_URL" />. The value is an ISO 639-1 language code (en, fr) optionally followed by a hyphen and an ISO 3166-1 Alpha 2 country code (en-US, fr-CA). Language always comes first, the region is a country (never a continent), and the href must be a full absolute URL.
Keep going
A calculator tells you what. A call tells you what to do about it.
Send me the account behind these numbers. I'll tell you straight where the money's leaking and what I'd fix first — free, and you keep it whether you hire me or not.