About Hreflang Tags
What hreflang tags do
Hreflang tags tell search engines that several pages are the same content in different languages, and which one to show to whom. Without them the versions compete, and the wrong one turns up for the wrong audience.
They are also the fix for a duplicate content problem you did not know you had: two English pages for the UK and the US are near-identical, and hreflang is what explains why both exist.
This generator builds the set for one page, including the parts that are easy to forget.
The rules that catch people out
- Every page in a set must list every page in the set, including itself.
- The references have to be reciprocal. A page that is listed but does not list back is ignored.
- Language first, region second: en-gb, not gb-en, and never a region on its own.
- Use absolute URLs.
- x-default is for anyone whose language you do not cover, and is worth setting.
The self-reference is the single most common omission, and it invalidates the whole set rather than just the one entry.
Common mistakes
- Invented codes. It is en-gb, not en-uk, which is not a valid region.
- Hreflang pointing at one URL while the canonical on that page points somewhere else.
- Listing a URL that redirects, or that no longer exists.
- Adding hreflang between pages that are not actually the same content.
- Maintaining a large set by hand, which is where the reciprocal errors creep in.
Does hreflang still matter in 2026?
For any site publishing in more than one language or targeting more than one country, yes. Nothing has replaced it, and the failure mode is unchanged: your Spanish page ranks for English searchers, who bounce.
It matters for assistants too, since they need to know which version to draw from for a given audience, and the tags are the clearest statement of that available.
The one thing hreflang does not do is help a page rank that would not otherwise. It sorts out which of your pages is shown, not whether any of them is.
Using the hreflang tag generator
Enter this page and its language, add a row for each translation, and the self-reference is added for you. Paste the result into the head of that page.
Then repeat for each other page in the set, listing the same URLs. It is repetitive by design - the reciprocity is what makes it work.
Where to go next
Check the tags once live with the
hreflang checker, confirm each page declares the right
HTML lang attribute, and make sure the
canonical tag on each version points at itself rather than across languages.