Skip to content
Aback Launch

Free Hreflang Tag Generator

Build the full hreflang set for a page in several languages or regions, with x-default, as HTML tags, sitemap entries or an HTTP header.

  • Free, no sign-up
  • Runs in your browser; nothing is uploaded
  • Updated Nov 19, 2026

One row per language or region version

  1. Version 1
  2. Version 2

HTML for every page's head

Add at least one version with a full URL and a language code.

Put the same set in the head of every page listed, including the page itself.

Launching soon? Get a launch page with the SEO done for you, free.Launch on Aback Launch

How to use the hreflang tag generator

  1. 1

    List every version

    One row per language or region: the full URL, a language code and an optional region.

  2. 2

    Pick an x-default

    The page for everyone else, often a language picker or your main version.

  3. 3

    Copy one format

    HTML tags for every page, sitemap entries, or an HTTP header for files like PDFs.

How hreflang works

Hreflang tells Google which version of a page to show to which language or region. Each version lists every version, including itself. If page A names page B, page B must name page A too, or Google may ignore the tags.

A code is a language in ISO 639-1 format, like en or de, plus an optional region in ISO 3166-1 alpha-2 format, like GB or MX. A region alone is not allowed, because Google does not work out the language from a country. The United Kingdom is GB, so the code is en-GB, never en-UK.

What x-default does

x-default names the page to show when no listed language matches the visitor's browser. It is optional, but Google recommends it. Point it at a language picker, or at the version you want everyone else to see.

HTML tags, sitemap or header

You can declare the same set in three places: link tags in the head of each page, xhtml:link entries in your XML sitemap, or an HTTP Link header. Google treats them the same, so one is enough. The header is for files without HTML, such as PDFs. The sitemap keeps page templates clean on large sites.

Questions

Is it en-UK or en-GB?

en-GB. The region is an ISO 3166-1 country code, and the United Kingdom's code is GB.

Does each page need to list itself?

Yes. Every version carries the full set, its own URL included. That is why the generator gives one set to paste on every page.

Can I use relative URLs?

No. Google requires fully qualified URLs, including https://.

Can two codes point to the same URL?

Yes. One page can serve en-GB and en-IE, for example. But one code can point to only one URL.

Guides for this

All free tools

Launch your startup on Aback Launch

Get a launch page that search engines and AI assistants can read, a place in the weekly launch list, and a review by a real person. Free to join.