International SEO

Hreflang Generator

Add each language or region version of a page, then copy the reciprocal hreflang tags. Every version should carry the full set, so search engines see the group point back to itself. This runs entirely in your browser.

Language and region codePage URL

How Hreflang Tags Affect International SEO

Hreflang tags tell Google which language and region each version of a page serves, so a shopper in Germany sees your German page and a reader in the United States sees the English one. Get them right and you avoid two costly problems: the wrong language ranking in a market, and your own translated pages competing against each other as near-duplicates. Get them wrong and Google ignores the signal, which sends visitors to a page they cannot read and drops your conversion rate in every market at once.

The rule that trips up most sites is that hreflang is a two-way handshake. Every version must list every other version, and each must point back. A German page that names a French alternate, while the French page never names the German one, breaks the whole set. The format matters too. The value reads as language then region, so British English is en-GB, not en-UK, and Google does not read "eu" as Europe. This generator builds the full reciprocal set for you and flags a bad code before it costs you a market. Add an x-default row for a language selector or global fallback page so visitors outside your listed regions still land somewhere sensible.

How to Add Hreflang on Shopify, WordPress, and Custom Sites

Shopify

Shopify Markets adds hreflang automatically once you set up translated markets, and most modern themes print the tags in the head through theme.liquid. Confirm the tags actually render by viewing the page source, since a customized theme can drop the snippet. If you translate with an app like Weglot or Langify, let the app own the tags and avoid a second source, because two systems writing hreflang produce conflicting or duplicated links.

WordPress

WPML and Polylang both output hreflang for translated content. Pick one translation plugin and stay with it, since running two creates competing tag sets. After setup, spot-check a translated page's source to confirm the tags are reciprocal and use the right region codes. If you also run an SEO plugin, make sure it is not adding its own hreflang on top of the translation plugin.

Custom sites

Add the reciprocal link tags in the head of each page, or list them in your XML sitemap with xhtml:link entries, which scales better for large sites. Generate them from one source of truth so every locale stays in sync, include the x-default, and use correct language-region codes. Paste your locales into this tool, copy the output, and drop it into your template or sitemap.

Once the tags are live, confirm them in Search Console's international targeting report and re-check whenever you add a language. A quarterly review catches the silent breaks, like a new page that shipped without its hreflang set, before they cost you visibility abroad.

Common Hreflang Errors That Break International SEO

Most hreflang problems fall into three buckets. Syntax errors come first: a flipped code like GB-en instead of en-GB, an invented region like en-UK, or a made-up continent value. Google simply ignores a malformed value, so the page it was meant to guide gets no help. Return-tag errors come second, where one page names another but the favor is not returned, which invalidates the pair. Coverage errors come third, where the home page carries a full set but the thousands of product or article pages beneath it carry none.

Two more issues catch larger sites. Mixing hreflang with the wrong canonical is a classic conflict: if a French page canonicalizes to the English URL, you tell Google to index only the English version and your hreflang set collapses. Each language version should carry a self-referencing canonical alongside its hreflang. And pointing hreflang at URLs that redirect wastes the signal, since the target should be the final, live URL. This generator keeps the set reciprocal and correctly formatted so these faults do not creep in.

When You Need Hreflang, and When You Do Not

Hreflang earns its keep when you publish the same content in more than one language, or the same language tuned for different countries, such as English for the United States and the United Kingdom with different prices and spelling. It is not a translation tool and it does not create pages. It only maps versions that already exist. If your site serves one language to one market, you do not need it at all, and adding empty or single-entry tags only adds risk.

For sites that do need it, decide between head tags and sitemap markup by scale. A small site can drop the link tags into each page head. A large catalog is easier to maintain with xhtml:link entries in the XML sitemap, generated from one source so every locale stays in sync. Whichever you choose, build the set once, keep it reciprocal, include an x-default, and re-run this tool whenever you launch a new market.

How to Test and Monitor Hreflang

After you ship the tags, verify them rather than assume they work, since hreflang fails without any visible error. View the page source and confirm the full reciprocal set appears on each version, including the x-default. A dedicated hreflang validator or crawler will check the return tags across the whole site and flag any page that points somewhere without a pointer back. Search Console's crawl stats and coverage reports then show whether the right pages are getting indexed in the right markets.

Make this a habit tied to releases. Every time you add a language, a market, or a batch of pages, generate the set here and confirm the new pages carry it before launch. Watch for pages that ship without the tags, which is the single most common way a healthy hreflang setup decays over time. A short check after each release keeps every market pointing at the right version and stops your translated pages from competing against each other in search.

Site search

Find research and resources

Type at least two characters to search.