hreflang tag generator
List each language or regional version of a page as code URL, one per line. Codes are an ISO 639-1 language, optionally followed by an ISO 3166-1 region (en, en-GB, pt-BR), or x-default for the fallback page.
Checking a whole site? Our Sitemap URL Validator fetches every URL in your sitemap and flags broken pages, redirects, noindex and canonical problems that make hreflang fail.
Rules Google applies
- Every version must list all versions, including itself (return links). Missing return links make Google ignore the pair.
- Use full absolute URLs, and the canonical URL of each version.
- Region alone is invalid:
gbmeans not a language; useen-GB.en-UKis wrong too: the code for the United Kingdom isGB. - Ukrainian is
uk, notua; Czech iscs, notcz. - Add
x-defaultfor a language picker or global fallback page. - Use one method per page (HTML, header or sitemap); mixing is allowed but must agree.