InstrumentsHreflang Tag Generator
Hreflang Tag Generator
Write hreflang alternate links for language versions of a page, with an optional x-default, and check the tags before you paste them.
Hreflang Tag Generator
Paste the same block on every listed page. Each page should list all of the versions, including itself.
Warning: each URL must match the real address of that language version. A link to a redirect or a missing page can cause search engines to ignore the tags.
One entry per line, written as lang | absolute URL, for example en-US | https://example.com/us. Use a language code, not x-default. Up to 100 entries.
The page for readers whose language is not listed. Must be one of the URLs above. Left empty, no x-default line is written.
No x-default is set. Set one to tell search engines which page to show when no listed language fits.
<link rel="alternate" hreflang="en-US" href="https://example.com/en" /> <link rel="alternate" hreflang="fr" href="https://example.com/fr" />
FAQ
Where do hreflang tags go?
In the head of each page in the group. Every listed page should carry the same set of links, including a link to itself, so the pages point to each other.
What does x-default mean?
x-default names the page to show when no listed language matches the reader. It must be one of the listed URLs. Google’s documentation describes it as an optional fallback.
Why do the URLs need to be exact?
Each href must be the real address of that language version. If a link points to a redirect or a page that does not exist, the alternate tags may be ignored, so check them against the live URLs.
Related tutorials
§04Toolbox
Related tools
Personalize your path
Choose your experience level once.
Next Step
Build fundamentals after each tool run so you can apply concepts with confidence.