Hreflang Tags Generator with Validated Return Links
Billion Game
Book a strategy call
Free · no signup · runs in your browser

Hreflang tags generator that checks the return links

Almost every broken hreflang implementation fails the same way: the tags are on one page and not on the others. Hreflang is only valid when it is reciprocal. If your German page points at your English page and the English page does not point back, Google discards the pair entirely and you have gained nothing.

Most generators hand you one page’s block and leave the rest to you, which is where it goes wrong. This one builds the whole cluster, validates every language and region code, and shows you the full set each page has to carry.

⇄
Return links checked
The matrix shows the full set every page must carry.
✓
Codes validated
en-UK, es-EU, underscores, casing — caught with the correction.
◈
Three output formats
HTML head tags, XML sitemap, or HTTP Link headers.
⊕
x-default handled
Prompted for, not silently omitted.
⚠
Canonical conflict warning
The mistake that silently voids a correct cluster.
↻
Nothing is lost
Saved in your browser between visits.
1 Your cluster 4 locales
Preset

English · United Kingdom

English · United States

German · Germany

✕ “UK” is not a valid region code. The ISO 3166-1 code for that country is GB.

Reciprocity 4×4 tags

Each of your 4 pages needs all 4 tags, which is 16 in total across the cluster. Ship a partial set and Google discards the pairs that are not reciprocated.

On page en-GB en-US de-DE en-UK
en-GB ◆ ✓ ✓ ✓
en-US ✓ ◆ ✓ ✓
de-DE ✓ ✓ ◆ ✓
en-UK ✓ ✓ ✓ ◆

Every page carries a tag for every locale including itself — the diagonal. A self-referencing tag is required, not optional, and its absence is the second most common reason a cluster is ignored.

2 Output 1 error
Tags for
<!-- In the <head> of https://example.com/en-gb/ --> <link rel="alternate" hreflang="en-GB" href="https://example.com/en-gb/" /> <link rel="alternate" hreflang="en-US" href="https://example.com/en-us/" /> <link rel="alternate" hreflang="de-DE" href="https://example.com/de/" /> <link rel="alternate" hreflang="en-UK" href="https://example.com/uk/" />
Identical set on every page in the cluster, only the surrounding page changes.
Validation 1 to fix above
! No x-default Without it, a visitor whose language and region match none of your locales gets whichever version Google guesses. x-default names the fallback explicitly. It is not mandatory, and on a two-locale cluster it matters less, but it is the cheapest line in the set.
i Canonical must agree Every page in the cluster canonicals to itself. A page that canonicals to a different language version is telling Google not to index it, which contradicts the hreflang set and voids the pair.
i Bing ignores hreflang Only Google and Yandex use it. Bing reads the content-language meta tag and geotargeting signals instead, so hreflang alone will not serve markets where Bing matters.
Then do these three things
  1. 1 Put the identical tag set on every page in the cluster, not just the one you generated. A missing return link voids the pair, and this is the single most common failure.
  2. 2 Confirm each page canonicals to itself, not to another language version. Hreflang and canonical contradicting each other is the second most common failure.
  3. 3 Check the International Targeting report in Search Console after deployment. It reports missing return tags and unknown language codes specifically.

Saved in this browser only. Nothing you type is sent anywhere.

Diagnosis

What are the most common hreflang mistakes?

The six most common hreflang mistakes, in rough order of how often Billion Game finds them, are missing return tags, no self-reference, invalid region codes, relative URLs, a canonical pointing to another language version, and tags in the body. Five of the six produce silent failure: nothing errors, the tags simply get ignored.

Mistake What happens The fix
Missing return tags Page A points to page B, but B does not point back. Google drops the pair silently. Ship the full set on every page. Generate the cluster, not one page.
No self-reference A page lists its alternates but omits itself, so the cluster is incomplete. Every page includes a tag for its own locale. The diagonal in the matrix above.
Invalid region codes en-UK, es-EU, and en-EN look plausible and are not valid. The tag is discarded. Language is ISO 639-1, region is ISO 3166-1 alpha-2. UK is GB.
Relative URLs A path instead of a full URL. Ignored entirely. Always absolute, including the protocol.
Canonical conflict The page canonicals to a different language version, so it should not be indexed at all. Each page canonicals to itself.
Tags in the body Link tags placed outside the head, where they are not read. Head only, or use the XML sitemap or HTTP header format instead.
The canonical trap

Hreflang and canonical must agree. If your German page canonicals to the English page, you have told Google the German page should not be indexed at all — and your hreflang cluster is arguing with itself. Every page in a cluster canonicals to itself.

Hreflang is not a ranking tactic

It does not make pages rank higher. It tells Google which version to show which audience, which reduces the wrong-country result and the duplicate-content confusion. Correct hreflang prevents a problem rather than creating an advantage.

Only Google and Yandex

Bing does not use hreflang; it prefers the content-language meta tag and geotargeting signals. If Bing matters to your markets, hreflang alone will not serve it. More on getting the whole setup right in international SEO.

Reference

What rules does hreflang enforce?

Hreflang requires return tags, a self-reference on every page, absolute URLs, ISO 639-1 language codes, ISO 3166-1 alpha-2 region codes, self-canonicals and one method only; x-default is optional. Hreflang is not a ranking signal: it swaps one already-ranking page for a more appropriate one, and only when every rule below is satisfied.

Rule What it requires What breaks when you get it wrong
Return tags Every page in a set must point back at every other page, including itself. A one-way tag is ignored entirely, silently
Self-reference Each page must include an hreflang tag pointing at its own URL. Without it, Google discards the whole cluster
Absolute URLs Full URLs with protocol and host. Relative paths are invalid. Tags parse but map to nothing
Language code ISO 639-1, two letters, lowercase. Language is required. en-GB is valid, GB alone is not
Region code ISO 3166-1 Alpha 2, optional, uppercase, after a hyphen. en-UK is a common invalid code; the correct one is en-GB
x-default Optional fallback for users no listed locale matches. Without it, unmatched users land on whichever page ranks
Canonical agreement Each page must self-canonicalise, not canonicalise to another locale. A cross-locale canonical cancels hreflang completely
One method only Head tags, HTTP headers, or the XML sitemap. Pick one. Conflicting methods produce unpredictable results
Worked examples

Three sets you can copy

Replace the domains and locales. Note that every example includes the self-referencing tag, which is where most implementations fail.

Two languages, one region each

The minimum valid set: each page references both itself and its counterpart.

Same language, several markets

English pages for four markets. Each is a distinct URL with its own pricing and shipping.

In the XML sitemap instead

Better for large sites: one place to maintain, and no page weight cost.


  https://example.com/en/
  
  
From real audits

Why does hreflang fail?

Hreflang fails because of missing return tags, missing self-referencing tags, canonicals pointing to another locale, invalid region codes, using hreflang to fix duplication, or expecting a ranking lift. Almost every international problem Billion Game inherits is one of these six, and none of them are translation problems.

Missing return tags Page A points at B, B does not point back. Google discards the relationship without warning, and the tool above will flag it.
No self-referencing tag The most common single failure. Every page in the cluster must list itself alongside its alternates.
Canonical pointing to another locale If /de/ canonicalises to /en/, you have told Google the German page should not exist. Hreflang cannot survive that.
Invalid region codes en-UK, en-EU and zh-CN written as cn are the three we see most. Only ISO 3166-1 Alpha 2 codes are valid.
Hreflang used to fix duplication It does not consolidate duplicate content or replace canonicals. Near-identical pages across markets still need genuine differentiation.
Expecting a ranking lift Hreflang swaps which page is shown to an already-qualifying searcher. If none of your pages rank in that market, correct hreflang changes nothing.
Our stack

Billion Game runs your work through the same instruments the best in-house teams use.

Licences are on us, and every export we pull from them is yours to keep.

Semrush logo
Ahrefs logo
Screaming Frog logo
Google Search Console logo
Google Analytics logo
PageSpeed Insights logo
Claude logo
Rank Math logo
WP Rocket logo
✎

Be wary of any agency whose reporting is a tool dashboard with their logo on it. Tools measure; they do not decide what matters, and every one of these will happily generate a hundred findings that change nothing. What you are paying for is the judgement about which three of those hundred are worth your developers’ time.

FAQ

Hreflang questions

The ones where the documentation is technically correct and practically unhelpful.

Generating correct tags is the easy half. Getting them onto every template, keeping them accurate as pages are added and retired, and validating after each release is the half that fails — and at scale that is international SEO work rather than a tool problem.

Hreflang is an HTML attribute that tells search engines which language and regional version of a page to show which audience. It does not improve rankings. What it does is prevent the wrong-country version appearing in results and stop near-identical translations competing with each other as duplicates. Correct hreflang prevents a problem rather than creating an advantage.

In our experience the cause is almost always missing return tags. Hreflang is reciprocal: if page A declares page B as an alternate, page B must declare page A. Google discards any pair that is not confirmed from both sides, silently and with no error anywhere except the International Targeting report. The next most common causes are a missing self-referencing tag, invalid region codes, and a canonical pointing at a different language version.

Yes. Each page in a cluster must include a tag for its own language and region alongside the tags for its alternates. Omitting the self-reference makes the cluster incomplete and is one of the most common reasons a technically present implementation is ignored.

No. The language part uses ISO 639-1 and the region part uses ISO 3166-1 alpha-2, where the code for the United Kingdom is GB, not UK. So en-GB is correct and en-UK is discarded. The same trap catches en-EN, which is not a country, and es-EU, since there is no country code for a trading bloc.

x-default names the page shown to visitors whose language and region match none of your alternates. It is not mandatory, but without it Google picks one of your versions for unmatched visitors and it may not be the one you would choose. It costs one line, so on any cluster covering more than two locales it is worth including.

All three are valid and equivalent, and you should pick exactly one. Head tags are simplest for small clusters. The XML sitemap is usually the best option at scale, because the whole cluster lives in one file rather than requiring template changes on every page type. HTTP headers exist for non-HTML resources such as PDFs. Using two methods at once invites contradictions.

Yes, and it is the most common real use. en-GB, en-US, and en-AU are distinct locales, and hreflang is how you stop them cannibalising each other. The pages should genuinely differ in some respect, such as pricing, currency, spelling, shipping, or legal detail, because near-identical duplicates across markets tend to get consolidated regardless of the tags.

They have to agree. Each page in a cluster canonicals to itself. Pointing a German page's canonical at the English version tells Google not to index the German page, which contradicts your hreflang set and voids the relationship. This combination is one of the more common ways a correct-looking implementation produces nothing.

Google and Yandex use it. Bing does not, and relies on the content-language meta tag along with geotargeting and hosting signals instead. If Bing matters in your markets you need those signals in addition, since hreflang alone will not serve it.

Yes, with no signup and no email gate. Everything runs in your browser, nothing you type is sent anywhere, and your cluster is saved locally so a refresh does not lose it. The output is yours to use on any site.

Correct tags on one page fix nothing.

Hreflang at scale is a templating and validation problem, not a generation problem. If your cluster spans thousands of URLs across markets, that is where it breaks.