How it works
- Enter one URL per line — one line for each language or regional version of the same page.
- Pair each URL with a language-region code from the searchable dropdown, for example
en-GB, de or pt-BR. - Choose which URL acts as
x-default, the fallback for visitors who match none of the listed versions. - Copy or download the output from three tabs: HTML tags, XML sitemap and HTTP headers.
What it produces and checks
- HTML link tags — a block of
<link rel="alternate" hreflang="…" href="…"> tags to paste into the <head> of every page in the set. - XML sitemap — a valid sitemap with the
xmlns:xhtml namespace and xhtml:link entries under every URL. - HTTP Link headers — header lines for PDFs and other non-HTML files, where you cannot add tags to a head section.
- Full reciprocal sets — every page lists every alternate, including itself, so return links are never missing.
- x-default — added once to every set, pointing to the URL you choose.
- Code validation — the same ISO 639-1 language and ISO 3166-1 alpha-2 region checks as the Hreflang Checker, catching values like
en-UK or en_US. - Copy and download — each tab can be copied to the clipboard or saved as a file.
Why it matters
Hreflang is easy to describe and easy to get wrong. With three languages you need nine annotations; with ten languages you need a hundred, and each page has to list the whole set, including itself. Writing them by hand invites the mistakes that cause search engines to ignore hreflang: a forgotten self-reference, a missing return link, a typo in a region code, or a sitemap that lists one fewer language than the HTML. Generating all formats from one list keeps them consistent. The generator only builds the markup; it does not fetch your pages, so it cannot see redirects, noindex rules or canonicals on the live URLs. Google's guide to localized versions of a page describes the three methods the tool supports.
How to fix common problems
Choose one delivery method and use it consistently: HTML tags for ordinary pages, the sitemap when editing templates is difficult, and HTTP headers for files such as PDFs. Use the final, absolute URL of each version — not a URL that redirects — and make sure each version has a canonical pointing to itself. If the dropdown rejects a code, check the region: the United Kingdom is GB, not UK. After publishing, run the Hreflang Checker on one of the pages to confirm the live annotations match, and use the Indexability Checker to make sure every alternate can be indexed. The HTTP Header Checker tool shows whether your server actually sends the Link headers.
Frequently asked questions
Why does every page need to list itself?
Each page in a hreflang group should carry the full set of annotations, including one that points to its own URL. That way every page states the same relationships and every link has a matching return link. The generator adds the self-reference automatically, so the block you paste is identical on every page in the set.
Which format should I choose: HTML, sitemap or HTTP headers?
All three are supported methods, so pick the one that fits your setup. HTML tags suit most sites. The sitemap keeps page templates untouched and is practical for large sites. HTTP headers are the option for PDFs and other non-HTML files. Mixing methods is possible, but they must then list exactly the same set.
What should I use as x-default?
Use the page you want visitors to see when none of the listed languages or regions match them. Often that is a language selector page or your main international version. The generator adds the x-default entry to every set once you choose the URL.
Can I use a language without a region?
Yes. A language code alone, such as de, targets German speakers in any country. Add a region, as in de-AT, only when you have a version for that specific country. A region on its own is not valid, which is why the dropdown always starts with a language.
Does the generator check my live pages?
No. It builds the markup from the URLs and codes you enter and validates the codes, but it does not fetch the pages. Once the annotations are live, use the Hreflang Checker, which fetches every alternate and reports return links, redirects, noindex and canonical conflicts.
Will correct hreflang make Google show the right version?
Correct hreflang gives Google a clear signal, but it is not a guarantee. Google can still choose another version based on other factors, and each version has to be indexed first. Valid, consistent annotations remove one common reason for the wrong page appearing.