Search tools

Search for a command to run...

Hreflang Tag Generator

Generate hreflang link tags (and the x-default) for multilingual or multi-regional sites, as HTML <link> tags or XML sitemap entries.

How to use

  1. 1List each version as 'language-code URL' (e.g. 'en-us https://example.com/').
  2. 2Choose the x-default URL and the output format, then add the tags to every version of the page.

How it's calculated

Each page version lists all versions, including itself. Codes are ISO 639-1 language codes, optionally with an ISO 3166-1 region (en-GB). x-default marks the fallback page.

Frequently asked questions

Does every page need the full set?

Yes — hreflang must be reciprocal: each version lists every other version and itself, or Google may ignore it.

Is it en-uk or en-gb?

en-gb — region codes follow ISO 3166-1, where the United Kingdom is GB.

What is x-default?

The page shown when no language matches the user, often a language selector or your main international page.