On a multilingual store, the same product page exists in five versions. With no indication, a search engine sees five near-identical pages, picks one per query, and may well serve the Spanish version to a German visitor. Hreflang tags exist to prevent that.
They are poorly understood, often badly implemented, and PrestaShop does not generate them natively in a complete way.
What hreflang does, and does not do
A useful clarification before any configuration. Hreflang does not push a page up in the results. It is a matching signal, not a quality one.
What it brings concretely: it indicates which version to serve according to the visitor’s language and region, and it groups the versions together so they do not compete with each other. A German page ranking well in Germany keeps its position, and the French visitor receives the French version rather than the same page in German.
On a site where every version is in the same language, French for France and French for Belgium for instance, hreflang is the only way to make clear which audience each one addresses.
The three absolute rules
A hreflang implementation is either valid or it is not. There is no halfway house, and three rules condition everything.
- Reciprocity. If the French page points to the German page, the German page has to point back to the French one. A non-reciprocal link is ignored. This is the leading cause of failure.
- Self-reference. Every page has to declare itself in the list. A French page listing only German and Spanish is incomplete.
- Consistency with the canonical tag. Every page needs a canonical pointing to itself. A canonical pointing to another version cancels the whole setup, since it tells the engine this page is not the right one.
Add a format constraint: the language code follows ISO 639-1, the optional country code follows ISO 3166-1. “fr” is valid, “fr-FR” too, “fr-fr” is tolerated, but “fr-EU” is not, the European Union not being a country.
Language or language plus country
A structuring choice that depends on your model.
If you sell the same catalogue on the same terms to every French speaker, a plain “fr” is enough. If you have a French store and a Belgian store with different prices and shipping costs, you need “fr-FR” and “fr-BE”.
The second case is more powerful and more fragile: it multiplies the number of relations to maintain. Three languages and four countries give twelve versions, therefore one hundred and thirty-two reciprocal relations to keep correct.
PrestaShop 8 Hreflang Module — Multilingual SEO Alternate Tags | DataFireflyCorrect hreflang tags on every PrestaShop 8 page: native translated URLs, x-default, multistore groups and 70+ hreflang codes.€29.00
Where to place the tags
Three possible locations, one is enough and they should not be mixed.
In the HTML head of the page. The most common, the easiest to check, and the heaviest if you have twelve versions: twelve extra lines on every page.
In the XML sitemap. Lighter on the page side, and practical with a large number of versions. In exchange, an error is less visible and the file grows large.
In HTTP headers. Reserved for non-HTML files, typically multilingual PDFs.
The x-default tag
It designates the page to serve when no version matches the visitor’s language. A Japanese visitor on a French, English and German site has to land somewhere.
Two correct uses: point to the English version, or to a country selection page. One incorrect and frequent use: point to the French version while also declaring it as “fr”. The page can hold both roles, but the declaration has to be explicit.
The most frequent mistakes
- Hreflang to an untranslated page. A product page exists in the language selector but its content stayed in French. The engine finds the two pages identical and stops trusting the whole set of declarations.
- Hreflang to a redirect. The declared URL returns a 301. The link is ignored.
- Hreflang to a blocked page. The URL is disallowed in the robots file, or carries a noindex tag. A direct contradiction.
- Partial declaration. Only the home pages are covered, not the product pages or the categories. This is the most widespread case, and it achieves close to nothing.
- Products disabled in one language. A reference sold in France but not in Spain breaks reciprocity if the declaration keeps pointing to a page that does not exist.
The PrestaShop case
Two architectures coexist and do not call for the same treatment.
In simple multilingual, one store with several languages, URLs are distinguished by a language prefix. Relations are easy to establish since every product has a unique identifier shared by all its translations.
In multistore, one store per country with distinct domains, the mapping is no longer automatic. A product can carry different identifiers depending on the store, or exist in one and not in the other. That is where manual generation becomes impractical.
Checking
Three verifications, in this order. The source code of a product page, to see the tags actually present. The international targeting report in Search Console, which surfaces reciprocity errors and invalid codes. And a sample check on twenty or so randomly drawn pages, because errors rarely cluster on the home page.
The Hreflang module for PrestaShop generates these tags automatically on PrestaShop 8 and 9: coverage of every page and not just the home page, multistore handling and cross-domain mapping, configurable x-default and exclusion of products unavailable in one version.