How to use Hreflang Tag Generator
- Enter one language code and full page URL per line, separated by a vertical bar.
- Add an x-default row if you have a fallback page for visitors outside the listed languages.
- Choose HTML head tags or an XML sitemap and generate the code.
- For HTML, put the same complete tag set on every listed language page, including each page's own URL.
Example: Hreflang Tag Generator
Mark English and French versions of the same guide.
Supported inputs and limits
Where your input is processed
This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.
Reciprocal entries matter
A search engine can ignore a language relationship when the two pages do not point back to each other. The HTML output is one complete set to place on each version. The XML output repeats that set for every listed URL. This local generator checks the lines you enter, not the live pages.
Questions about Hreflang Tag Generator
Does every page need to link to itself?
Yes. Include the full alternate set on each localized page, including the page currently being viewed.
When should I add x-default?
Add it for a language selector or other fallback page intended for visitors whose language is not one of the listed variants.
Can the URLs be on different domains?
Yes. Use full URLs for each variant and make sure the pages refer back to each other after you publish them.
Should I use HTML and a sitemap together?
One correctly maintained method is enough. Choose the method your site can keep current as pages change.