Hreflang Tag Generator

Running a site in multiple languages or regions? Hreflang tags tell Google which URL to show which audience, preventing the wrong-language page from ranking. Add your language and region URLs below and copy the complete set of tags.

<link rel="alternate" hreflang="en" href="https://example.com/" />
<link rel="alternate" hreflang="en-gb" href="https://example.com/uk/" />
<link rel="alternate" hreflang="de" href="https://example.com/de/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />

How to use the hreflang tool

  1. 1Enter each language-region code and its URL.
  2. 2Add an x-default URL for unmatched audiences.
  3. 3Copy the tags into every alternate page's <head> (or your sitemap).
  4. 4Make the tags reciprocal - each version must list all the others.

Frequently asked questions

An hreflang tag tells search engines which language and region a page targets, so Google serves the right version to each searcher. It's essential for sites with multiple language or country variants.

Use an ISO language code (e.g. en), optionally with a region (e.g. en-gb). The language comes first, then an optional country - never a country on its own.

x-default is the fallback shown to users whose language or region you don't explicitly target. It usually points to a language selector or your primary global page.

Yes, and they must be reciprocal - each language version must list all the others, including itself. Missing return tags are the most common hreflang mistake.

In the <head> of each page, in your XML sitemap, or as HTTP headers. Pick one method and apply it consistently across all alternate pages.

More free SEO tools

Skip the manual work - let Spook rank you

These tools help with the pieces. Spook does the whole job: it finds winnable queries, writes the articles, and publishes them on autopilot.