Hreflang Generator
Turn a list of language and country versions of a page into ready-to-paste hreflang tags for a multi-region store.
Your details
Your hreflang tags
<link rel="alternate" hreflang="en" href="https://example.com/" />
<link rel="alternate" hreflang="en-GB" href="https://example.com/uk/" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/" />
<link rel="alternate" hreflang="de" href="https://example.com/de/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />Filling in the list
One line per version of the page, a language code (and country, optionally) and the full URL, separated by a comma: en-GB, https://yourstore.co.uk/products/example.
- Language only:
en,fr,de. Use when the content only changes by language, not by country. - Language and region:
en-GB,en-US,fr-CA. Use when you have separate pages per country, like a UK site and a US site both in English. - x-default: the page to show a visitor whose language isn't in your list. Always include one.
Every URL you list should have its own set of hreflang tags pointing back to all the others, including itself. This tool builds the tags for one page; repeat it for each version, swapping which URL is "self".
Questions people ask
Do these tags go on every page, or just one?
On every version. If you have a US and a UK product page, both pages need the full set of hreflang tags, including a self-referencing one.
Where do these tags go in my HTML?
Inside the <head> of each page. On Shopify Markets, this is usually handled automatically; use this generator mainly for a headless build or a platform that doesn't add them for you.
What's the difference between hreflang and a Shopify Market?
A Shopify Market controls currency, pricing and which domain or subfolder a region sees. Hreflang tags are what tell Google which of those versions to show in search results for a given language or country.
Is x-default required?
Not strictly, but Google recommends it. Without one, a visitor whose language isn't listed gets Google's best guess instead of a page you chose.
Related tools
Last reviewed 30 September 2026.
Sources: Google Search Central: Telling Google about localized versions of your page · Shopify Help Center: Setting up international domains and subfolders
