On-Page SEO · 100% Free · No Signup

Hreflang Tag Generator

Hreflang tells Google which language/region version of a page to show each searcher — and it's notoriously easy to get wrong (invalid codes, missing return links, forgotten x-default). This generator turns a simple 'code | URL' list into the complete tag set.

— fill in the fields above —

Every version, including the page itself, must carry the full set of alternates, and every pair must link back reciprocally. Generate once, paste into all versions, and include an x-default for unmatched users.

How to Use the Hreflang Tag Generator

  1. 1List each version as 'language-code | URL' (e.g. en-gb | https://…).
  2. 2Add an x-default line pointing to your global fallback.
  3. 3Copy the generated tags into the <head> of every listed version.
  4. 4Validate return links — every version must reference all others.

Frequently Asked Questions

What format do hreflang codes use?
ISO 639-1 language, optionally with ISO 3166-1 Alpha-2 region: en, en-us, en-gb, es, es-mx. Region alone (like 'us') is invalid — language is mandatory.
What is x-default for?
It designates the fallback page for users whose language/region matches none of your versions — typically your global English page or a language selector.
Why are my hreflang tags ignored?
The usual causes: missing reciprocal return tags, non-canonical URLs in the set, or conflicting canonicals. Every URL in the cluster must be indexable and self-consistent.