Skip to content
SEO & Marketing

Hreflang Tag Generator

Free hreflang tag generator. Map language and region codes to their URLs and get the full set of <link rel="alternate" hreflang> tags, including x-default, ready to paste into your <head>.

Hreflang tags

Hreflang tags tell search engines which language and regional version of a page to show each visitor. When you publish the same content for different locales — English for the US and the UK, or Spanish for Spain and Mexico — hreflang annotations keep those variants from competing with each other and steer users to the version written for them. Done correctly, they improve international targeting and reduce duplicate-content confusion.

Enter each language or region code with its matching URL, and optionally an x-default for users who do not fit any listed locale. The tool outputs a complete set of <link rel="alternate" hreflang> tags, skipping empty rows, that you can paste into the <head> of every page in the group.

Frequently asked questions

What format should the hreflang code use?

Use an ISO 639-1 language code, optionally followed by a hyphen and an ISO 3166-1 region code, such as en, en-us, or pt-br.

What is x-default for?

x-default specifies a fallback page for users whose language or region does not match any of your listed variants, often a language selector or a global home page.

Do all pages in the group need the same tags?

Yes. Hreflang annotations must be reciprocal — every page in the set should list all the alternates, including itself, so search engines can confirm the relationships.

Add the Hreflang Tag Generator to your site.

Ship it as a ranking page on your own domain in minutes.

Start free →