Free Hreflang Generator — Create hreflang Tags & x-default
Hreflang Generator
A hreflang generator takes a set of URLs paired with language and region codes and produces the reciprocal <link rel="alternate" hreflang="x"> tags that each page in the set must carry, including an x-default fallback. Hreflang only works when every URL in the set references every other URL, including itself, using valid ISO 639-1 language and ISO 3166-1 region codes. Enter your URL and locale pairs below to generate ready-to-paste tags, an HTTP header version for non-HTML files, and an XML sitemap variant.
Enter your URLs and language/region pairs to generate valid hreflang link tags, an x-default entry and an HTTP-header or sitemap variant. Free, no signup.
Add each URL with its language and optional region
List every localised version of the page — for example en, en-GB, fr, de — with the full URL for each. Region codes are optional but recommended when the same language serves multiple markets with different content or currency.
Generator builds the full reciprocal set
Hreflang requires every page to list itself and every alternate. The tool builds the complete cross-referenced block automatically, so you don't have to copy the same list onto every page by hand and risk a mismatch.
Choose HTML, HTTP header or sitemap output
Use <link> tags in the <head> for HTML pages, HTTP Link headers for PDFs or other non-HTML files, or a single sitemap.xml block if you're managing hreflang centrally instead of per-page.
Frequently asked questions
Do hreflang tags need to be on every page in the set?
Yes. Hreflang is reciprocal — if page A lists page B as an alternate, page B must also list page A and itself. A one-way reference is invalid and Google will typically ignore the whole cluster until the annotations are symmetrical on every URL.
What is x-default for?
x-default tells Google which version to serve to users whose language or region doesn't match any of the listed alternates — typically a language-selector page or your default market. It's optional but recommended whenever you have more than one locale.
Can I use hreflang without separate URLs per language?
No. Hreflang annotates distinct URLs, so each language or region version needs its own crawlable URL — a subdirectory, subdomain or separate domain. It cannot be applied to a single URL that changes content based on browser settings alone.
Does hreflang affect rankings?
Hreflang doesn't directly boost rankings, but it prevents the wrong-language version from ranking in a market's search results and stops duplicate-content confusion between near-identical localised pages, which protects the rankings each version would otherwise earn on its own.