Hreflang Tag Generator
Free hreflang tag generator. Create correct hreflang annotations for multilingual and multi-region sites, with x-default, ready to paste. Avoid hreflang errors. No signup.
Generate correct hreflang tags for every language and region version of your page. Add your URLs and their locales and this free tool outputs valid hreflang annotations, including x-default, in HTML, HTTP header, or XML sitemap format, so international search sends the right page to the right user.
Hreflang tag generator
Create reciprocal hreflang tags for every language and region version of a page, including x-default.
How to use the Hreflang Tag Generator
- Enter each URL with its language and country code.
- Add an x-default (recommended).
- Choose HTML, header, or sitemap output.
- Copy the generated hreflang tags.
Why hreflang matters
Hreflang tells Google which language and regional version of a page to show each user, preventing duplicate-content confusion across localized pages and improving international rankings. It is also one of the most error-prone parts of technical SEO, so generating valid, reciprocal tags saves hours of debugging.
How hreflang actually works
Hreflang does not choose which version ranks, it tells Google which version to show to which audience once the cluster has been understood. Every page in a cluster must list every other page, including itself. If one page omits the return tag, Google discards the relationship and serves whichever version it prefers.
Getting the codes right
Use ISO 639-1 for language and ISO 3166-1 Alpha 2 for region: en, en-gb, es-mx, de-at. Region alone is invalid, gb on its own will be ignored. Add x-default for the version that should serve everyone you have not targeted explicitly.
The five failures we see most
- Missing return tags on one or two pages in the set.
- Relative URLs instead of absolute ones.
- Hreflang pointing at URLs that redirect or 404.
- Canonical tags fighting hreflang by pointing at a different language.
- Automatic IP redirects that stop crawlers reaching alternate versions at all.
Links across international versions
Authority does not flow freely between language versions just because hreflang exists. Each market usually needs its own local link acquisition, in the local language, from publishers in that country, which is the work we do on our link building campaigns.
Key features
- Valid language-region codes
- x-default support
- HTML, header, and sitemap formats
- Reciprocal-tag guidance
- Free
Frequently asked questions
What is x-default?
The fallback version shown to users whose language or region you don’t target specifically.
Do hreflang tags need to be reciprocal?
Yes, every page in the set must reference all the others, including itself.
Where can hreflang go?
In the HTML , HTTP headers, or the XML sitemap, pick one method.
Related free tools
Schema Markup Generator · Sitemap XML Generator · SEO Meta Tag Analyzer. See all of our free SEO tools.
Want the links and rankings handled for you?
Our team runs the outreach, earns the placements and reports every live link. Explore our link building services or tell us your target pages for a plan.
Other free tools
Found problems you would rather not fix yourself?
Send us the scan output. We will tell you which issues actually affect rankings, and quote the work if you want it handled.