Hreflang Tag Generator
Build hreflang link tags for multilingual or multinational sites. Tell Google which language version to show which audience.
List language–URL pairs
One per line. Format: lang-code URL.
Include x-default if you have a fallback
Useful when a region has no exact language match.
Add to every translated page
All language versions should reference each other.
Build hreflang tags
How hreflang works
Hreflang tags tell Google which language and region a page is meant for. Without them, Google may serve the wrong language to your visitors — your French page to English speakers or vice versa.
Format rules
- Use ISO 639-1 two-letter language codes (en, fr, de, es).
- Optionally add region with ISO 3166-1 (en-US, en-GB, es-MX).
- Use
x-defaultfor the fallback page (usually the international or English version). - Every language version must list every other version, including itself.
Frequently asked questions
Where do I put hreflang tags?
In the <head> of every language version of the page. They can also be sent via HTTP header or sitemap, but head tags are simplest.
Do I need to include myself in the list?
Yes. Each page must reference all language alternatives including itself (the "return tag" rule).
What is x-default for?
The fallback page when no language matches. Often points to the international or English version.
Can I use hreflang for the same language in different countries?
Yes. en-US and en-GB are common when content differs slightly (currency, spelling).
Does hreflang affect ranking?
Not directly. But it sends the right version to the right user, which improves engagement metrics that do affect ranking.