INTERNATIONAL SEO · FREE TOOL
Connect your language and regional pages with accurate hreflang markup.
Generate HTML tags or XML sitemap annotations, including x-default. No account, payment or API needed. Your entries are processed in this browser and are not sent to Degates.
← All free SEO tools2. Copy or download your code
Inputs changed. Generate again to refresh the output.
Download a separate sitemap for each host. Each includes all alternates but only this host’s URLs as sitemap entries. Publish at that host’s root, or merge into its existing sitemap.
How to use the Hreflang Tag Generator
- Add one entry for each language or regional version of the same page. Include the current page and, optionally, an x-default fallback.
- Generate the code. Choose HTML tags or XML sitemap output.
- For HTML, put the identical complete set inside the
<head>of every alternate page. For XML, include each page’s self-reference and all alternates; upload each host’s sitemap at its root or integrate with your sitemap system. - Check that your URLs are canonical, crawlable and indexable, and that every alternate points back to the others. Regenerate when URLs change.
This tool checks input syntax; it does not fetch URLs, verify translations or guarantee Google indexing. Choose the implementation method that fits your site; you do not need both HTML and XML.
Frequently asked questions
What is hreflang?
Hreflang identifies equivalent language or regional versions of a page so search engines can understand which version is intended for each audience.
What does x-default mean?
It identifies a fallback page for visitors whose language or region does not match the other entries, often a language selector or general page.
Which language and region codes can I use?
Use an ISO 639-1 two-letter language, optionally with an ISO 3166-1 two-letter region, such as en-GB. Supported script examples include zh-Hans and zh-Hant. A region alone, such as US, is not a language.
Do I need reciprocal and self-referencing tags?
Yes. Each alternate should include itself and link to every other alternate, with the same set repeated on those pages.
Can alternate pages be on different domains?
Yes. HTML annotations can reference different domains. XML output is separated by host so each sitemap lists its own host’s pages while referencing the complete alternate set.
Is my data saved or submitted?
This generator does not submit, store or fetch your entries. Code generation, copying and downloading happen in your browser. Refreshing the page clears the form.