Translated URLs and hreflang on Shopify
Shopify lets you translate the address of a product, collection, page, blog or article, not just its text. That's good for shoppers, and it changes what your hreflang tags need to say. Here is what changes, how to spot tags that point at the old address, and how to fix them.
What a translated URL looks like
Every product has a handle, the last part of its address. A snowboard called "The Videographer Snowboard" might live at:
https://yourstore.com/products/the-videographer-snowboard
When you translate the store into French, you can translate the handle too, in Shopify's Translate & Adapt app or by importing a translation file. The French page then lives at:
https://yourstore.com/fr/products/la-planche-du-videaste
Only the handle changes. The /products/ part stays in English, and so does /collections/ for collections.
What happens to the old address
The French version still answers at the English handle, but only to send visitors on. On our own test store, opening
https://yourstore.com/fr/products/the-videographer-snowboard
lands on /fr/products/la-planche-du-videaste. Shopify redirects the old handle to the translated one, so shoppers who follow an old link still get the right page.
Why that matters for hreflang
Hreflang tags should point at the page itself, not at an address that redirects to it. A tag set built by taking the current page's address and adding a language prefix gets this wrong as soon as a handle is translated:
<link rel="alternate" hreflang="fr" href="https://yourstore.com/fr/products/the-videographer-snowboard">
That address redirects, so the French alternate points at a redirect. Search engines may follow it, or may treat the pair as broken and ignore the tags. Either way, they are being told something that isn't quite true about where your French page lives. The correct tag uses the translated handle:
<link rel="alternate" hreflang="fr" href="https://yourstore.com/fr/products/la-planche-du-videaste">
This catches out tag sources that only know the page being viewed. A theme snippet, for example, can see the current page's handle but has no simple way to look up another language's handle, so it builds the alternate from the handle it has.
How to spot alternates that redirect
Pick a product, collection or page whose handle you've translated. Then:
- Run its English address through the free hreflang checker. It opens every alternate and flags any that redirect, with the address each one redirects to.
- Run the translated page too. Its tags should list the English page at the English handle and itself at the translated one.
To check by hand, view the page's source (Ctrl+U on Windows, Option+Command+U on a Mac), find the tag for the other language, copy its address into a new tab, and see whether the address bar changes when the page loads. If it does, the tag points at a redirect.
Translated handles are per page, so checking one product says nothing certain about the next. Check a few products and collections, starting with the ones that matter most to you.
Fixing it
The fix belongs in whatever prints your tags.
- If Shopify's automatic tags are your only source and the checker finds no redirecting alternates, there is nothing to fix.
- If a theme snippet or an app prints the tags and they point at redirects, that source doesn't know your translated handles. Check its settings for an option to use translated URLs. If it has none, turn it off and use a source that does.
- Avoid fixing it by removing translated handles. Translated addresses are better for French shoppers, and changing handles back creates more redirects of its own.
This is the case Hreflang Manager was built for. It reads the translated handle of every product, collection, page, blog and article from Shopify, so each alternate points at the real page, and its audit checks your live pages for alternates that redirect. It has a free plan.
For the rest of what to check, see how to check the hreflang tags on your Shopify store.
Sources
- Google Search Central: Tell Google about localized versions of your page.
- Shopify Help Center: Translate & Adapt.