Hreflang Tag Generator

Serving multiple languages or regions? This free hreflang tag generator creates the link tags that tell Google which version of a page to show each audience — preventing duplicate-content issues and getting the right URL in front of the right user.

How to use the hreflang generator

Add one row for each language or regional version of your page. Enter the language-region code (such as en-us, es-es, or fr-ca) and the full URL for that version. Optionally include an x-default fallback for users whose language you do not target. Copy the generated tags into the <head> of every version of the page — each version should list all the others, including itself.

Frequently asked questions

What is hreflang?

Hreflang is an HTML attribute that tells search engines the language and geographic targeting of a page. It helps Google serve the correct localized version in search results and avoids treating translations as duplicate content.

Do all language versions need to reference each other?

Yes. Hreflang annotations must be reciprocal: if page A points to page B, page B must point back to A. Each page should also include a self-referencing tag. This generator makes it easy to produce the full set.

What is x-default?

The x-default value specifies a fallback page for users whose language or region you have not explicitly targeted — often your homepage or an international landing page.

See your site’s full SEO score — free.Instant audit, 10 checks, no signup to see it.
Run free audit →
Free tools →My toolkit →Locations →Comparisons →
Start free with all 34 tools — no credit card, cancel anytimeStart Free