hreflang Tag Generator
Generate hreflang link tags for multilingual pages.
If you serve the same content in multiple languages or regions, you need hreflang tags to tell search engines “the other language versions of this page live here.” This generator takes a language code and URL per row and produces a block of <link rel="alternate"> tags you can paste straight into your page <head>.
Everything runs in your browser and nothing is sent to any server. Add an x-default row to point unmatched visitors at a fallback page, and the tool warns you if you enter the same code twice.
What hreflang is and when to use it
hreflang tells search engines about the language/region alternates of the same content. It helps show Korean speakers the Korean page and US-English speakers the en-US page, reducing duplicate content issues and serving localized results. Use a bare ISO 639-1 language code (ko, en, ja) or a language-region form (en-US, pt-BR, zh-Hant).
Reciprocal links are required
The most important rule is that hreflang must be reciprocal. If page A points to B as an alternate, page B must point back to A (and to the whole set, including itself). If only one side declares the relationship, search engines distrust and ignore the entire cluster. In practice the safest approach is to have every language version share the exact same hreflang block. That means each page's <head> contains:
- A
hreflanglink for every language version, including itself. - (Optional) one
x-defaultlink.
x-default and why absolute URLs
x-defaultmarks the fallback page for visitors who don't explicitly match any language/region. It usually points to a language-selection screen or a global English page. It is optional but recommended because it lets you control the unmatched experience.
Always use an absolute URL in href (a full address starting with https://). Relative paths do not work for hreflang, and each URL should match that page's canonical URL exactly — same protocol, domain, and trailing slash.
- Add one row per language/region with its code and absolute URL.
- Optionally add an
x-defaultrow for the fallback page. - Copy the generated
<link>block into the<head>of every version, identically.
After inserting it, use the SEO meta tag checkerto confirm each page's canonical and hreflang made it into the actual HTML as intended.