Hreflang Tag Generator
Generate hreflang tags for a site with more than one language or region. Language and country codes are validated as you type, and x-default is supported.
Runs entirely in your browser — nothing is uploaded
Language versions
Add one row per translated version of this page, each with its own absolute URL.
Where to send visitors whose language matches none of the above. Usually your international or English version.
Hreflang tags
Add a language and URL to beginHow to use this tool
- Add a row for each language version, with its absolute URL.
- Set an x-default for visitors whose language matches none of them.
- Copy the tags into the head of every listed page — including each page itself.
What is Hreflang Generator?
Hreflang tells search engines that several pages are translations or regional variants of the same content, so the right one is shown to the right person. It does not affect ranking; it affects which version ranks.
The rule that trips most implementations is reciprocity. If page A lists page B, page B must list page A — and both must list themselves. A one-way reference is ignored entirely.
Best practices
- Use ISO 639-1 language codes (en, ur, ar) and ISO 3166-1 Alpha-2 country codes (PK, GB, US).
- Language alone is valid; country alone is not. "en" works, "GB" does not.
- Every page in the set must reference every other page, and itself.
- Always use absolute URLs.
- Add x-default for the fallback version — usually your international or English page.
Frequently asked questions
What is x-default for?
It marks the page to show when no other version matches the visitor’s language or region. Typically a language-selection page or your main international version.
Do I need hreflang if my site is in one language?
No. It is only useful when the same content exists in multiple languages or is targeted at multiple regions.
Why are my hreflang tags being ignored?
Almost always missing return references. Every page in the group must point at every other page and at itself. Search Console’s international targeting report shows which links are missing.
Related tools
Want this done properly on your site?
These tools handle the checks. If you would rather someone did the work — the audit, the fixes and the content — that is what I do.
Results are provided for informational purposes and may vary depending on the website, browser, network and available data.