PrestaShop hreflang by example: do your language versions point to each other correctly
PrestaShop hreflang tags sit in the page head and tell Google the same page exists in other languages, and where. They work when each version points to all the others and to itself, every address returns a 200 code, and the canonical points to its own language. You can check this in the page code or in a conversation with the chat.
Author: The TellMyShop team. A guide for PrestaShop store owners: the cause, the manual fix and the same work in a chat conversation.
Last updated: · 6 min read
How does hreflang work in a store with three languages?
It is easiest to show with an example. Take a lamp store in three languages and one product, the Nora lantern. The addresses and names are examples.
| Version | Product URL | Canonical | Hreflang on this page |
|---|---|---|---|
| Polish | /pl/lampiony/215-lampion-nora.html | the Polish URL | pl, en, de |
| English | /en/lanterns/215-nora-lantern.html | the English URL | pl, en, de |
| German | /de/laternen/215-laterne-nora.html | the German URL | pl, en, de |
Each of the three pages has the same set of three links, including a link to itself. Each page's canonical points to its own address, not to the Polish version. That is how Google describes it in its guide on localised versions of pages: the set of links must be identical on every version.
In the page code it looks roughly like this:
<link rel="canonical" href="https://shop.example/en/lanterns/215-nora-lantern.html">
<link rel="alternate" href="https://shop.example/pl/lampiony/215-lampion-nora.html" hreflang="pl-pl">
<link rel="alternate" href="https://shop.example/en/lanterns/215-nora-lantern.html" hreflang="en-us">
<link rel="alternate" href="https://shop.example/de/laternen/215-laterne-nora.html" hreflang="de-de">
PrestaShop takes the language codes from the settings under International → Localization → Languages. If you sell to the United Kingdom but English has the code en-us, Google is told that this version is for Americans. It is worth checking while you're there.
What most often breaks hreflang in PrestaShop?
The tags are usually there, but they point to something Google won't accept. Five situations come up most often in stores:
The canonical points to another language. An SEO module or a manual theme fix sets the canonical of every version to the Polish URL. Google gets conflicting signals: hreflang says “these are separate versions”, the canonical says “this is a copy of the Polish one”. The canonical usually wins and the foreign versions disappear from the results.
A link leads to a redirect or a 404. The product is disabled in one language version, or you changed its URL in one language only. We cover URL changes in the post on changing a product URL.
Content is missing in a language. The English version has a translated menu, but the product description stays in Polish. Google says plainly that versions are duplicates when the main content isn't translated. The post on translating a PrestaShop store shows what to translate and in what order.
A module redirects by browser or country. A customer from Germany goes straight to the German version. Google's crawler, which arrives with different settings, may never see the other versions.
The theme has no tags, or has them twice. A bought theme removes the block from the head, and an SEO module adds its own links. The page then has two sets, sometimes with different language codes.
How to check hreflang step by step
Check one page of each type: the home page, a category and a product. Problems usually repeat across the whole page type.
- Open a product in the Polish version and view the page source (Ctrl+U in most browsers).
- Search for the text
hreflang. Note how many links there are and which language codes they have. - Search for
canonical. The address should be the same as the page you're looking at. - Open every address from the hreflang links. Each should load without a redirect.
- On a page in another language, repeat steps 2 and 3. The set of links must be the same.
- Check that the page content in the foreign language is really translated, not just the menu.
In a larger store checking by hand takes a lot of time, so start with pages that get traffic from abroad. Google's help on localised versions also describes the rules for linking language versions, and MyPresta's guide to hreflang collects typical mistakes in PrestaShop stores.
Do separate domains for languages work the same way?
The principle is the same, but PrestaShop helps less. When the German version runs as a separate shop in multistore mode, for example on a .de domain, each shop has its own language list. The theme creates links only to that shop's languages, so the Polish page usually won't point to the German domain, nor the German one to the Polish.
In that set-up there are two routes. The first is a module that links products between shops and outputs a shared set of links. The second is a sitemap with hreflang links, which Google also accepts. Both require that products in both shops can be paired unambiguously, for example by the same ID or reference. Before you start, check on a few products that the pairs match, because a wrong pair is worse than none.
How will the chat check language versions in your store?
You ask it to check a few pages in a few languages. Your chat (Claude or ChatGPT) with the TellMyShop module opens each one the way Google sees it and puts the results in a table: response code, redirects, canonical, hreflang pairs and meta robots.
You: Check whether the pl, en and de versions of the Nora lantern point to each other correctly.
Your chat: The Polish and German versions are fine. In the English one, the canonical points to the Polish URL, so Google may treat it as a copy.
Your chat: The product description in the English version is in Polish. I suggest this translation:
Your chat: The canonical is set by the SEO module in the page head. That is a change in the module settings, not in the product.
You: Save the translation. We'll check the canonical in the module tomorrow.
Your chat: Saved in the English version. The change is in the change history.
old version: Lampion z kutego metalu, wysokość 40 cm, do ogrodu i na taras.
new version: Wrought metal lantern, 40 cm tall, for the garden and the patio.
The values in the example are illustrative. In your store, the chat shows the data from your pages.
In the free TellMyShop Free version, the chat checks pages in every language and tells you what is wrong, but saves nothing. An example of this request is in the use case checking whether language versions point to each other.
In TellMyShop Pro, translations of descriptions, categories, pages and meta data are saved as soon as the licence is activated, with a preview and your agreement. You can undo most changes from the change history. You change the SEO module settings once the Modules switch is on, and the tag block in the theme template once the Theme switch is on. Both last 24 hours and need a database backup from today. Translating the whole store layer by layer is described in the use case translating the whole store, and plans are on the pricing page.
Questions and answers
Does PrestaShop add hreflang tags by itself?
The Classic theme adds a link to every enabled language version in the page head. Themes bought separately may do it differently or not at all. So always check the code of one page in your own store rather than assuming it is fine.
Is an untranslated language version a duplicate?
Yes, if the main content of the page stays in the original language. Google treats language versions as duplicates when only the menu and buttons differ. Translate the product and category descriptions that get traffic first.
What is x-default and do I need it?
It points to the page for people whose language the store doesn't support, for example a language selection page or the English version. It isn't mandatory. It is useful when the store sells abroad in several languages.
Does automatic redirection by browser language do harm?
It can. Google's crawler usually arrives without your local settings and, after a redirect, sees only one version of the store. It is better to suggest a language change to the customer and leave the choice to them.
Can TellMyShop Free check hreflang?
Yes. The free TellMyShop Free version opens store pages the way Google sees them and shows the response code, canonical and hreflang pairs. TellMyShop Pro saves fixes to translations and to the theme template.
PrestaShop is a registered trademark of PrestaShop SA. Claude is a trademark of Anthropic PBC. ChatGPT and OpenAI are trademarks of OpenAI. TellMyShop is not affiliated with these companies.