Generate hreflang link elements for language and regional versions of a page. Add each language code and its absolute URL, then copy the tags into the relevant page markup.
Hreflang Tag Generator
Generate hreflang link tags for language and regional versions of a page.
Input Section
Hreflang Tags
Insights / Tips
- Use valid language or language-region codes, such as en, en-us, or fr-ca.
- Each alternate page should reference the other language versions, including itself.
- Make sure the URLs are absolute and canonical.
What this tool can do
- Language alternatives: add multiple language or language-region URL pairs.
- Optional x-default: include a fallback URL for users whose language does not match a listed version.
- Input validation: check language-code format and absolute HTTP or HTTPS URLs.
- Copy-ready HTML: generate alternate link elements.
How to use the hreflang tag generator
- Enter one language code and URL per line using
en|https://example.com/. - Add more language or regional versions as needed.
- Optionally enter an
x-defaultURL. - Click Generate Tags and copy the output.
- Add consistent reciprocal hreflang annotations to the corresponding alternate pages.
Important notes
- Use valid language and region codes, such as
en,en-us, orfr-ca. - Each alternate page should reference the other versions, including itself.
- Make sure alternate URLs are canonical, accessible, and consistent across versions.
Frequently asked questions
What is hreflang?
Hreflang annotations help search engines understand which language or regional version of a page is intended for users.
Is x-default required?
No. It can identify a default page for users whose language or region does not match another listed version.
Do pages need reciprocal tags?
Yes. Alternate pages should reference each other consistently for annotations to be interpreted correctly.
Does hreflang guarantee a regional ranking?
No. It is a signal that helps search engines understand alternate versions, not a ranking guarantee.
