How it works
Every version lists itself and all the others.
The hreflang tag tells Google about the language or regional versions of the same page, so search results show the version that fits the visitor's language. Each version must list itself and every other version. This tool builds the full set from the URLs you enter, x-default included, as HTML and as an XML sitemap.
Official sources (last checked: 18 November 2026)
- HTML: <link rel="alternate" hreflang="language-code" href="URL" /> (in every page's <head>, for all versions)
- Sitemap: under each <url>, an <xhtml:link rel="alternate" …> for every version, itself included
- x-default: the page for visitors who match no language
How to use it: add a row per language version and enter the page's full URL and its language code. A code is a language (en, de) with an optional region (en-GB, de-AT); a country code alone is invalid.
Add the whole HTML block to every page listed. The tags must be reciprocal: if page A points to B but B does not point back to A, Google ignores both.
HTML tags, HTTP headers and the sitemap are equivalent for Google; one is enough, and using all three brings no extra benefit. For many pages the sitemap is easier to maintain.
Limits
- The tool does not check that the pages you enter exist or carry the return tags; it only generates the tags.
- Every page needs its own set: this output covers the language versions of one page.
- hreflang is a signal, not a redirect; Google can still show another version based on other signals.
- Each page's canonical tag should point to itself; a canonical that points to another language version conflicts with hreflang.
Frequently asked questions
What is x-default for?
Copy linkIt names the page to show when no version matches the visitor's browser language. It is usually a language selector or the main language version. It is not required, but it is recommended.
Which language code should I use?
Copy linkThe ISO 639-1 code for the language (en, de, tr) and, if you add a region, the ISO 3166-1 Alpha 2 code (en-GB, pt-BR). "UK" is not a valid region code; the United Kingdom is "GB".
Do I need the tags on every page?
Copy linkYes. Every language version must list all versions, itself included. A tag missing on one version invalidates hreflang for that pair.
HTML or sitemap?
Copy linkThey are equivalent for Google. HTML tags are simple for a few pages; with hundreds of pages a sitemap keeps the page size down and is managed in one place.
Let’s set up your language and country architecture.
We draw up a plan for hreflang, URL structure and localized content.











