Hreflang Tag Generator
Generate an HTML hreflang set or an XML sitemap for equivalent language versions. Check locale codes, conflicting URLs and the optional x-default destination before copying or downloading.
Generate Hreflang for Every Alternate Page
Hreflang Tag Generator: how to use it
- Enter one language code and canonical page URL per line separated by ->. Add x-default when you have a fallback destination.
- Generate hreflang and resolve any line-specific findings. Choose HTML head tags or an XML sitemap for the selected origin.
- Copy or download the output. For HTML, install the same set on each listed page and check the published pages for self-references and return links.
Limits and notes
Up to 32 mapping lines. Full HTTP(S) URLs must serialize to fewer than 2,048 characters and omit fragments and credentials. Supports known two-letter languages with optional script and two-letter region codes, and x-default. Exports a sitemap for each distinct origin and limits generated alternate markup to 2 MB. Only the supplied mappings are checked. No URLs are fetched.
How your privacy works →Hreflang Tag Generator: common questions
Do I need different HTML tags for each page?
Put the same HTML set in the head of every listed page. Each set includes the page’s own link and all other alternate pages.
Can related pages use different domains?
Yes. HTML tags retain the full URL of every alternate. The XML view groups `<loc>` entries by origin while retaining all alternate links in each entry.
Is x-default required?
It is optional. Add it if you have a page or selector for visitors whose language or region has no matching version.