Generate hreflang tags for international and multilingual websites. Add language and region variants, auto-adds self-reference tag, x-default support, real-time validation for missing self-reference and reciprocal tags, HTML link and XML sitemap output.
Click Add Language to add each version of your page. Select the ISO 639-1 language code and optionally an ISO 3166-1 country code for regional targeting (e.g. en-GB, en-US, fr-FR). Enter the full absolute URL for each variant. The tool automatically includes a self-referencing tag for the current page.
Enable x-default and enter the fallback URL shown to users whose language does not match any variant. Review the validation warnings — the most common error is a missing self-reference tag. The relationship table shows all language↔URL mappings at a glance.
Toggle between HTML link tags (for your page head section) and XML sitemap format (for your sitemap.xml). Copy the output and implement on all variants of the page — every variant must include the full set of hreflang tags for the bidirectional relationship to work.
Hreflang tags are HTML link elements (or XML sitemap entries) that tell search engines which language and regional version of a page to serve to users in different markets. They prevent duplicate content penalties for multilingual sites and ensure users see the correct language version in search results.
Every page must include an hreflang tag pointing to itself — this is the number one implementation error. Without the self-reference, Google may ignore the entire hreflang implementation for that page. If page A in English lists page B in French, page A must also include an hreflang pointing to its own URL with lang="en".
Hreflang must be bidirectional. If page A includes an hreflang pointing to page B, page B must include an hreflang pointing back to page A. Google ignores one-directional hreflang implementations. This validator warns you if reciprocal tags appear to be missing based on the URLs you have entered.
x-default is a special hreflang value that designates the fallback page shown to users whose language and region does not match any specific variant. It is typically the English version, a language selector page, or your main domain homepage. Google recommends including x-default in every hreflang implementation.
HTML hreflang tags go in the head section of each individual page — every page must include the full set of tags for all variants. XML sitemap hreflang is an alternative where you declare all language/region mappings in your sitemap.xml file using xhtml:link elements. Both methods are equally effective — choose based on your CMS and whether you control page head sections directly.
The five most common errors are: (1) Missing self-reference tag, (2) Missing reciprocal tags on linked pages, (3) Wrong language codes (using "uk" for Ukrainian — correct is "uk", using "jp" for Japanese — correct is "ja"), (4) Mixing HTML and XML sitemap implementation on the same site, (5) Hreflang pointing to non-canonical URLs or redirected URLs.