TOOLTIKI Lovable tool, really free
SEO & web Tags

Hreflang tag generator

Generated in your browser · nothing is uploaded

Local · self-reference included automatically
Advertisement
320 × 100

Builds the `rel="alternate" hreflang` tags that tell search engines which language version of a page to show which visitors. The same block goes on every page in the set, each listing all the others and itself.

How to use the hreflang tag generator

1 Add one line per language version: the code, a pipe, and the URL.
2 Add an x-default for visitors matching none of them.
3 Put the same block on every page in the set — including its own line.

The rule that breaks most hreflang setups is reciprocity. Every page in a language set must link to every other page in the set and to itself, and every one of those pages must link back. If the English page lists the Dutch one but the Dutch page does not list the English one, search engines discard the entire cluster — not just the broken link. That is why the block is identical on every page rather than tailored per page, and why the self-reference is not optional.

The codes are ISO 639-1 for language and ISO 3166-1 Alpha 2 for region, in that order: en, or en-GB, never GB-en and never uk for the United Kingdom, whose code is gb. Region alone is not valid — hreflang="gb" is meaningless; it must carry a language.

x-default is for visitors whose language matches nothing in the set. A language-selector page is the textbook use, but pointing it at your main version is more practical and more common. Without one, a visitor matching no version gets whichever page the search engine considers strongest, which may not be the one you would choose.

One thing hreflang does not do: it is not a ranking signal and it does not consolidate authority. It decides which version of a page to show, nothing more. It also does not stop the versions being seen as duplicates — for that you still need each page to carry a self-referencing canonical, pointing at itself and not at another language.

Questions

Reciprocity. Every page in the set must list every other and itself, or search engines discard the whole cluster.

Google Search Central — localised versionsISO 639-1 language codes
Advertisement
300 × 250
Was this tool any good?
INTERNAL SIGNAL ONLY · WE USE IT TO FIND TOOLS WORTH REBUILDING