Home Free tools hreflang tag generator
Free hreflang tag generator and checker
List each language or country version of a page with its URL. The tool writes the full set of hreflang link tags and flags invalid codes such as en-UK, underscores, missing x-default and relative URLs. Put the same block on every page in the set.
Worked example
Load the sample. It has four versions and four mistakes the checker names. en-UK is wrong because the ISO 3166-1 code for the United Kingdom is GB, so the tag should be en-GB. de_DE uses an underscore where the standard uses a hyphen. The French URL uses http. There is no x-default. Fix each, then copy the block into the head of the US, UK, German and French pages: every page carries all four tags, including its own.
The rules in short
- Codes are a language (ISO 639-1, such as
en), optionally followed by a country (ISO 3166-1 Alpha 2, such asGB). A country alone is not valid. - Every page in the set lists every page, including itself. If page A points to B and B does not point back, Google ignores the pair.
- URLs are absolute and fully qualified.
x-defaultnames the fallback page, often a language picker or the main version.- Each version is canonical to itself, not to another language. See the canonical tag checker.
These rules come from Google's localized versions guide. hreflang can also go in HTTP headers or in the sitemap; this tool writes the HTML tags.
When you do not need it
One language for one market needs no hreflang. Use it when the same content exists in several languages, or in one language with real regional differences such as currency or spelling.
Fix the whole loop, not one tag
This tool answers one question. Superflow reads your site, runs the search fixes and drafts the content, and asks before anything important goes out.
Request early access What is an AI CMO?Questions people ask
What is hreflang?
hreflang tells search engines which language and region each version of a page is for, so the right version shows to each searcher.
Is it en-UK or en-GB?
It is en-GB. The ISO country code for the United Kingdom is GB. en-UK is a common mistake.
Do I need x-default?
It is optional but useful: it names the page to show visitors whose language you do not cover.