Free tool

Hreflang Tag Generator

Build correct hreflang alternate link tags — with an x-default — for your multilingual and multi-region pages, then copy the ready-to-paste HTML block. Everything runs in your browser; nothing is uploaded.

Your language / region versions

Add one row per URL. Pick a language, an optional region, and paste the full URL of that version.

Language Region URL

Used when no language/region matches the visitor — usually a language selector or your primary version.

Generated tags

Paste this block into the <head> of every version listed — each page must include the full set, including a link to itself.

Reminder: hreflang annotations must be reciprocal — if page A points to page B, page B must point back — and each page must reference itself.

What is hreflang & how to use it

What hreflang does

The hreflang attribute tells Google which language and region a page targets, so it can serve the right version to the right searcher. It maps out your set of equivalent pages (e.g. an English-NZ page and its Spanish-ES twin).

Why it matters

For international and multi-region sites it prevents the wrong-language page ranking, cuts duplicate-content confusion between near-identical pages, and improves click-through by showing users content in their language.

Reciprocity & self-reference

Annotations must be bidirectional: every page in the set must link to every other page and to itself. If the return link is missing, Google ignores the annotation. This tool outputs the full self-inclusive set for you to paste on each page.

What x-default means

x-default is the fallback for users whose language/region isn’t explicitly targeted. Point it at a global language-selector page or your primary market version. It’s optional but recommended.

Value format

Each value is a language code (en) or language-region (en-nz). Language is ISO 639-1; region is ISO 3166-1 alpha-2. Region alone is invalid — always lead with a language. Values are case-insensitive; we lowercase them.

Where to place the tags

Add the <link> tags in the <head> of each page. Alternatively you can declare the same relationships in your XML sitemap or via HTTP Link: headers (handy for non-HTML files like PDFs). Pick one method — don’t mix them for the same URLs.

Get a Free SEO Audit

Not sure your hreflang setup is correct? We’ll review your international targeting and the rest of your technical SEO — free.

Get a Free SEO Audit