SEOApril 14, 20269 min read

hreflang for Ecommerce: A Complete Guide to International SEO

Learn how to implement hreflang tags for international ecommerce. Covers multi-language, multi-region targeting, common mistakes, and platform-specific implementation.

StoreVitals Team

If you sell in multiple countries or multiple languages, hreflang is one of the most impactful — and most frequently botched — technical SEO implementations in ecommerce. Done right, it ensures shoppers in Germany see your German site, shoppers in France see your French site, and Google indexes each version correctly. Done wrong, it causes cross-region cannibalization, duplicate content penalties, and search results that show the wrong language to the wrong audience.

What Is hreflang?

hreflang is an HTML attribute (or HTTP header, or sitemap entry) that tells Google:

  1. This page is a language/region variant
  2. Here are all the other variants of this page
  3. Which language and region each variant targets

It's not a directive — Google uses it as a hint, not an absolute instruction. But consistent implementation dramatically improves international ranking accuracy.

When You Need hreflang

You need hreflang if:

  • You have the same content in multiple languages (English + Spanish + French)
  • You have region-specific versions of the same language (US English vs UK English vs Australian English)
  • You have both language and region combinations (French for France, French for Canada, French for Belgium)

You do not need hreflang if your site is in one language targeting one region.

The hreflang Attribute Format

hreflang uses IETF language codes: a two-letter language code optionally followed by a two-letter region code.

  • en — English (any region)
  • en-US — English for the United States
  • en-GB — English for the United Kingdom
  • fr — French (any French-speaking region)
  • fr-FR — French for France
  • fr-CA — French for Canada
  • x-default — Default/fallback page (users who don't match any specific variant)

Implementation Methods

Method 1: HTML Head Tags (Recommended)

Add link tags to the <head> of every page variant. Every page must reference every other variant, including itself:

<!-- On the US English page -->
<link rel="alternate" hreflang="en-US" href="https://yourstore.com/us/products/item" />
<link rel="alternate" hreflang="en-GB" href="https://yourstore.com/uk/products/item" />
<link rel="alternate" hreflang="fr-FR" href="https://yourstore.com/fr/products/item" />
<link rel="alternate" hreflang="x-default" href="https://yourstore.com/products/item" />

Method 2: XML Sitemap

For large catalogs, the sitemap method is often more practical than adding tags to every page. Each URL in the sitemap includes an alternate entry for every language/region variant:

<url>
  <loc>https://yourstore.com/us/products/item</loc>
  <xhtml:link rel="alternate" hreflang="en-US" href="https://yourstore.com/us/products/item"/>
  <xhtml:link rel="alternate" hreflang="en-GB" href="https://yourstore.com/uk/products/item"/>
  <xhtml:link rel="alternate" hreflang="x-default" href="https://yourstore.com/products/item"/>
</url>

URL Structure for International Stores

Three common approaches, ordered from most to least SEO-friendly:

Country-code top-level domains (ccTLDs)

  • yourstore.de, yourstore.fr, yourstore.co.uk
  • Strongest geo-targeting signal; Google knows exactly where each site belongs
  • Most expensive: separate domains, separate SEO work per domain

Subdirectories (recommended for most stores)

  • yourstore.com/de/, yourstore.com/fr/, yourstore.com/uk/
  • All content lives under one domain — link equity is shared
  • Easy to manage with a single CMS, clear URL structure

Subdomains

  • de.yourstore.com, fr.yourstore.com
  • Google treats subdomains somewhat like separate sites — link equity doesn't flow as freely
  • Harder to manage; generally a compromise choice

Common hreflang Mistakes

1. Missing Self-Reference

Every page must include an hreflang tag pointing to itself. If the US English page doesn't include hreflang="en-US" pointing to its own URL, the tag set is invalid.

2. Non-Reciprocal Links

If Page A references Page B as its French variant, Page B must reference Page A as its English variant. Google ignores hreflang sets where the references don't go both ways.

3. Returning Noindex on Alternate Pages

Google needs to be able to crawl and index alternate pages. If your German pages return noindex, Google can't validate the hreflang relationship — and will likely ignore it entirely.

4. Using the Wrong Language Code

Use zh-Hans for Simplified Chinese and zh-Hant for Traditional Chinese — not zh-CN or zh-TW. Google's documentation specifies the correct codes.

5. Pointing to Redirects

hreflang URLs must point to the final destination, not to a redirect. If your hreflang points to a URL that 301-redirects elsewhere, Google ignores the tag.

Platform Notes

Shopify

Shopify Markets (the international selling feature) automatically adds hreflang tags for your market configurations. However, it uses subfolders by default (/en-us, /fr-fr). Review your theme's layout/theme.liquid to confirm hreflang tags are being rendered correctly — some themes have bugs.

WooCommerce + WPML

WPML handles hreflang automatically when properly configured. Check WPML → Languages → Language URL Format for your chosen URL structure, and enable the "hreflang" option in SEO settings.

Magento

Magento store views are often used for multi-language/region setups. Use a dedicated extension (Magento 2 hreflang extensions are available from Amasty, Mirasvit) or configure them manually in the theme's head block.

Testing Your hreflang Implementation

  • Google Search Console → International Targeting — Shows hreflang errors across your entire site
  • Google's URL Inspection tool — Shows how Google reads hreflang on any specific URL
  • hreflang checker tools (Ahrefs, Screaming Frog) — Validate tag syntax and reciprocal linking across large catalogs

International SEO is built on a foundation of technical health. Before implementing hreflang across hundreds of product pages, run a StoreVitals health scan to identify technical issues that could undermine your international strategy — broken links, missing canonical tags, and crawlability problems affect all versions of your site equally.

hreflangInternational SEOMulti-LanguageTechnical SEO

See these issues on your store?

Run a free scan and find out in seconds.

Run Free Scan