SEO

Hreflang Tag Generator

Add a row for each language or region version of a page, then copy or download the generated <link> tags for that page's <head>.

Shown to search engines when no other entry matches a visitor's language or region, commonly your default page or a language-selector page.

About this tool

hreflang tags tell search engines which URL to show for a visitor's language and region when you have multiple localized versions of the same page. Each tag pairs a language code (optionally with a region) to the URL of that version, so the same full set of tags belongs on every one of those pages, including a link back to itself, not just on one "main" version.

Language vs. language-region codes

A code like es targets all Spanish speakers regardless of country, while es-MX targets Spanish speakers specifically in Mexico. Use the broader language-only code when you have one version per language, and add a region only when you actually have separate content per region, adding a region code you don't have distinct content for doesn't help and can create mismatches.

Why x-default matters

x-default isn't a real language code, it's a reserved value marking the page to show visitors whose language/region doesn't match any of your other entries, typically a language-selector page or your default locale. Search engines don't strictly require it, but leaving it out means unmatched visitors get search engines' best guess instead of a page you chose.