Hreflang Tag Generator - Build a Valid Language Cluster With x-default
Create hreflang tags for international and multi-language SEO.
Fallback URL when no specific language match is found
About hreflang tags
- Hreflang tags tell search engines which language/region version to serve to users
- Place these tags in the <head> section of your HTML
- Use language codes (en, es) or language-region codes (en-US, es-MX)
- Each language version should include hreflang tags pointing to all other versions
- The x-default tag specifies a fallback page when no match is found
Implementation tips
- Use ISO 639-1 language codes (2 letters) and ISO 3166-1 Alpha 2 country codes
- Hreflang tags must be bidirectional (each page must link to all others)
- URLs should be absolute, including protocol (https://)
- Self-referencing hreflang is required on each page
- Alternative: Use HTTP headers or XML sitemaps for hreflang
Table of Contents
Enter each language version of a page with its URL and language code, and this tool returns the hreflang block to place on every URL in the set. Hreflang is the annotation that tells Google which translation of a page to show which audience. It is for anyone running the same content in more than one language.
The rule that catches people out
Hreflang must be reciprocal. If the English page points to the Korean one, the Korean page must point back to the English one, and both must list themselves. A cluster where one page is missing a return link is not partially valid - Google discards the unconfirmed annotation entirely. That is why the tool outputs one block containing every URL, meant to be pasted unchanged onto all of them.
Worked example
A page in English and Korean, with English as the fallback for everyone else:
<link rel="alternate" hreflang="en" href="https://example.com/pyeong-to-square-meters" />
<link rel="alternate" hreflang="ko" href="https://example.com/ko/pyeong-to-square-meters" />
<link rel="alternate" hreflang="x-default" href="https://example.com/pyeong-to-square-meters" /> All three lines go on both URLs, unchanged. The x-default value is not a language - it marks the page to serve when no listed language matches the user, which is why it usually points at the English or the language-selector page.
Codes
The language part is an ISO 639-1 code such as en, ko or ja. You may add an ISO 3166-1 Alpha 2 region after a hyphen, as in en-GB or pt-BR. Region alone is invalid: hreflang="GB" is not a thing. Use a region only when the content genuinely differs by country, such as pricing or shipping.
Honest limits
Hreflang is a signal about which version to show, not about whether to show you at all. It does not lift rankings, and it will not rescue a page that is not indexed - if the Korean version is blocked from crawling or noindexed, the annotation cannot help it. Get the pages indexable first, then annotate them.
Related tools
Confirm the alternates are indexed with check Google indexing, review the head block with the meta tags analyzer, generate the surrounding tags with the meta tag generator, and add structured data with the schema markup generator. More in SEO tools.