The hreflang attribute is the fundamental technical solution for international SEO. It tells search engines which language and regional versions of your pages exist, ensuring users see the version in their language — and preventing your pages in different languages from competing against each other in search results. For a PrestaShop store selling across multiple countries, hreflang is non-negotiable.
What is the hreflang attribute?
The hreflang attribute (or rel="alternate" hreflang="" tag) is an HTML annotation that signals to search engines the existence of alternative versions of a page in different languages or for different regions. Introduced by Google in 2011, it is now the standard for multilingual and international SEO.
Its primary role is twofold:
- Language targeting: directing an English-speaking user to the English version of your store, a German user to the German version, and so on.
- Duplicate prevention: preventing two pages in the same language (e.g., a French version for France and a French version for Belgium) from competing against each other in the SERPs.
Syntax and implementation
The hreflang tag is placed in the <head> section of each page, with one entry for each available language version, including the current page itself:
Hreflang implementation example
<link rel="alternate" hreflang="en" href="https://store.com/en/shoes" />
<link rel="alternate" hreflang="fr" href="https://store.com/fr/chaussures" />
<link rel="alternate" hreflang="de" href="https://store.com/de/schuhe" />
<link rel="alternate" hreflang="x-default" href="https://store.com/en/shoes" />The x-default value indicates the default page for users whose language is not explicitly targeted.
Language and region codes
Hreflang codes follow the BCP 47 standard. You can use:
- Language code only:
hreflang="en"— targets all English speakers, regardless of their geographic location. - Language + region code:
hreflang="en-US"for the United States,hreflang="en-GB"for the United Kingdom,hreflang="en-AU"for Australia. - x-default: a special value pointing to the default version for users who don't match any other hreflang entry (often the international English version).
Three implementation methods
HTML tags (Head)
The most common method. Hreflang tags are added directly in the of each page. Recommended for stores with server-side rendered content (native PrestaShop).
XML Sitemap
Hreflang annotations can be integrated into the XML sitemap via
HTTP Header
For non-HTML pages (PDFs, files), hreflang annotations can be delivered via HTTP headers. Rarely used for standard e-commerce stores.
Common mistakes that sabotage your international SEO
Hreflang implementation is notorious for its complexity and many sources of error. The most critical ones:
- Missing return links: every language version must reference all the others. If the EN page points to DE, the DE page must also point back to EN. Missing reciprocity invalidates the entire configuration.
- Missing self-referencing tag: every page must include itself in its own hreflang list. The EN page must contain a
hreflang="en"tag pointing to itself. - Incorrect language codes: using
en-usinstead ofen-US, or ISO 639-2 codes (3 letters) instead of ISO 639-1 codes (2 letters), invalidates the tags. - Missing x-default: without the x-default value, users whose language is not covered may not be served an appropriate version.
- Hreflang on redirected pages: if the target page is redirected (301, 302), Google may ignore the tag. Always point to the final URL.
Hreflang is a recommendation, not a mandate
Hreflang and PrestaShop: practical use cases
PrestaShop natively manages multiple languages, creating language-specific URLs (typically in the form of /en/, /fr/, /de/ prefixes). Without hreflang, all these versions can be perceived by Google as duplicate content — even if they're in different languages but cover the same products.
Key areas to pay attention to in PrestaShop:
- Multilingual product pages: each translated product page generates a URL per language. All these URLs must be linked together via hreflang.
- Category pages: categories have different slugs per language (/shoes, /chaussures, /schuhe). Hreflang allows Google to understand these are the same category.
- CMS pages (legal notices, T&Cs): these pages are often translated but very similar — without hreflang, they may be flagged as duplicate content.