Hreflang Generator
Generate correct hreflang link tags for every language version of a page — with x-default.
How to use the Hreflang Generator
- Add a row for each language: its hreflang code and the page URL.
- Keep x-default on so search engines have a fallback.
- Copy the generated tags into your page head.
About the Hreflang Generator
The Hreflang Generator builds the <link rel="alternate" hreflang="…"> tags that tell Google which language or regional version of a page to show each visitor. You add one row per version — the hreflang code (like en, en-GB or es-MX) and that version's full URL — and the tool outputs clean, ready-to-paste tags for your page's <head>.
It also adds an x-default tag, which names the page to fall back to when no language matches the visitor — a step people often forget. Getting hreflang right prevents the wrong-language page from ranking, stops versions competing with each other, and keeps duplicate-content signals clean across your translations. Remember that hreflang must be reciprocal: every version should list every other version, including itself, so paste the same set of tags on each page. If you also list alternates in your sitemap, the sitemap generator helps, and the meta tag generator covers the rest of your head tags.
Frequently asked questions
What is an hreflang tag?
It is a link tag in a page's head that tells search engines the page has other language or regional versions, and where to find them, so the right version is served to each user.
What is x-default for?
x-default marks the fallback URL to use when none of your listed languages matches the visitor's language or region. It is recommended for language selectors and international home pages.
Does hreflang have to be reciprocal?
Yes. Each version must reference every version, itself included. If page A points to B but B does not point back to A, search engines may ignore the annotation.
What code should I use?
Use an ISO 639-1 language code (en, es, fr), optionally with an ISO 3166-1 region (en-GB, es-MX). Use the language alone unless you truly target a specific country.
Where do the tags go?
In the head of every language version of the page. You can also deliver hreflang via an XML sitemap or HTTP headers, but the head tags are the simplest to manage.

