Hreflang Tag Generator
Generate hreflang link tags for every language and region version of a page.
About the Hreflang Tag Generator
Hreflang annotations tell search engines which language or regional version of a page to show each searcher. Every version must list all versions, including itself – so the same block of tags goes on every page in the set.
Enter each version’s language code (e.g. en, en-GB, es-MX) and URL to generate the tags, either as HTML <link> elements for the head or as an XML sitemap snippet. Codes are validated as you type, and common mistakes such as en-UK are flagged.
Frequently asked questions
Which format should I use?
HTML tags are easiest for small sites. For large sites, hreflang in the XML sitemap keeps your HTML light and is easier to manage centrally.
What language codes are valid?
An ISO 639-1 language code (en, fr, de), optionally followed by an ISO 3166-1 region (en-GB, fr-CA). Region alone is not valid.
Do I need x-default?
It is recommended for the page users should see when no language matches, such as a language selector or your main international page.