Hreflang Generator
PMPaul Myers

Hreflang tags, written properly

Add the URL for each language or country version of a page and generate the complete set of hreflang tags for all of them. The tool also checks for the quiet mistakes that cause hreflang to fail, including missing self-references, invalid codes, countries entered as languages and pages that do not link back to one another.

Your pages

List every version of the same page, one per line. Put the locale first, then a comma, then the full URL.

en-GB, https://example.co.uk/garage-door-seals de-DE, https://example.de/garagentordichtungen x-default, https://example.com/garage-door-seals
  • Locale is a language code on its own, such as en, de or fr. Add a country code when you have separate versions for separate countries: en-GB, en-US, de-AT.
  • URL must be the full address, starting https://. A relative path will not work.
  • x-default is the version to show when none of the others match the visitor. Usually your global or English page. Optional, but worth having.
  • One line per version, including the page you are on. A set that leaves itself out is ignored by Google.

Your tags

Every page in the set needs the full block, including its own line. That is the rule most sites get wrong.

Your tags will appear here.

Hreflang tells Google which version of a page to show in which country or language. It does not make a page rank. If the wrong country's page is showing, this is usually the fix. If nothing ranks anywhere, this is not.