In short
On a multilingual site, each translated page must declare its own URL as canonical: https://example.com/de/preise/ points to https://example.com/de/preise/, not to the French page it was translated from. Language versions are linked to one another with hreflang, never with the canonical. Once this task is done, every translation whose main content is actually translated carries a self-referencing, absolute canonical that is consistent with its hreflang annotations and the sitemap.
Why it matters
The rel="canonical" tag tells Google which URL represents a group of duplicates. A translation, however, is not a duplicate: Google states that language versions of a page are only considered duplicates if their main content is in the same language. A German page and a French page are two separate pages, each one indexable for searches in its own language.
The canonical and hreflang play two different roles:
- the canonical designates the reference version among copies of the same page in the same language (tracking parameters, sorting, trailing slash);
hreflanglinks the equivalents in other languages or regions, so that Google shows each user the right version.
When you use hreflang, Google recommends specifying a canonical page in the same language. It also states that, when choosing canonicals, it favors URLs that are part of an hreflang cluster. A self-referencing canonical on each translation is the simplest way to follow both rules.
Generative engines rely in part on search engine indexes. A translation indexed under its own URL can be found and cited in an answer to a question asked in its language; a translation absorbed by the main version cannot. No tag guarantees a citation, however.
What it improves
- Indexing of each language The translation is treated as a page in its own right, not as a copy of the original.
- How hreflang works The annotations link canonical URLs; they are consistent instead of being contradicted.
- Display The right language appears in the results of each market.
- Measurement Search Console attributes clicks and impressions to the canonical URL; a clean canonical prevents a translation's data from being counted against another URL.
- Citations in AI answers An indirect, non-guaranteed effect, through the page's presence in the indexes.
- Rankings No direct effect. The tag does not push a page up; it keeps it from disappearing.
How to check
Compare the canonical of each language version of the same page:
for url in \
"https://example.com/fr/tarifs/" \
"https://example.com/de/preise/" \
"https://example.com/en/pricing/"; do
printf '%s -> ' "$url"
curl -s "$url" | grep -oiE '<link[^>]*rel="?canonical"?[^>]*>' | grep -oiE 'href="[^"]*"'
done
Expected result: each line shows its own URL. A German line that shows href="https://example.com/fr/tarifs/" reveals the problem covered in do not canonicalize all translations to the main language (opens in a new tab).
Also check the HTTP header, which can carry a competing canonical:
curl -sI https://example.com/de/preise/ | grep -i "^link:"
Across the whole site:
- Screaming Frog: enable
hreflangstorage (Configuration > Spider > Crawl), crawl, then open theCanonicalstab. The “Canonicalised” filter lists the pages that point to another URL: no translation should appear there. TheHreflangtab flags non-canonical targets. - Search Console: for one URL in each language, the URL Inspection tool shows the user-declared canonical and the Google-selected canonical. Both must be the inspected URL.
How to implement
Before you start
Define what an “actual translation” is and what each case must declare:
| Situation | Canonical | hreflang |
|---|---|---|
| Main content translated (text, headings, useful data) | Itself | Yes, to all equivalent versions |
| Adapted regional variant in the same language (prices, currency, shipping) | Itself | Yes, with the region code (fr-BE) |
| Only the menu and footer translated, body in the original language | Do not publish; otherwise the original page | No |
| Translation in progress, published by mistake | noindex or removal |
No |
| Printable or parameterized version of a translation | The clean translation, in its language | No |
Rules for building it, valid everywhere:
- Absolute URL, with the protocol and the production domain, plus the language prefix (
/de/) or the language's host. - Built from the translation's clean URL, without tracking parameters, and not copied from the original.
- Identical to the URL declared in
hreflangand in the sitemap for that language. See align hreflang and canonical (opens in a new tab). - A single source: theme, SEO plugin or translation plugin, not two.
The following sections cover generating the tag. The general logic of the self-referencing canonical is detailed in use self-referencing canonicals where relevant (opens in a new tab).
WordPress
Versions WordPress 6.4 to 7.1; WPML 4, Polylang 3, TranslatePress 3, Weglot 6, Yoast SEO 20 and later, Rank Math 1.0.
With a translation plugin that creates one post per language, each translation has its own permalink, and the canonical output by WordPress or by the SEO plugin points to that permalink.
- WPML: each translation is a separate piece of content. Yoast SEO and Rank Math write a canonical to the translated URL. Check in
WPML > Settings > Custom Fields Translationthat the SEO plugin's canonical field (_yoast_wpseo_canonicalfor Yoast) is not set to “Copy”: a canonical entered by hand on the original would be copied to every translation. - Polylang: same principle, one post per language. Leave the SEO plugin's “Canonical URL” field empty on translations.
- TranslatePress and Weglot: translations are generated on the fly from the original page. Use the test in the “How to check” section to confirm that the canonical of
/de/…does contain/de/: these plugins normally rewrite the page's URLs, canonical tag included, but a theme that hard-codes the tag can slip through.
Without an SEO plugin, WordPress core outputs the canonical with wp_get_canonical_url(), based on the permalink of the post being displayed: a translation stored as a separate post therefore gets its own URL without any code. If a theme or a code snippet writes a second <link rel="canonical"> tag in header.php, remove it.
Clear the page cache after each change.
Shopify
Versions Shopify admin and Online Store 2.0 themes, all plans, November 2026.
Shopify handles canonicals automatically: each market or language version published on its own domain, subdomain or subfolder carries a self-referencing canonical, and the hreflang annotations are generated. Keep the standard line in layout/theme.liquid:
<link rel="canonical" href="{{ canonical_url }}">
Do not replace it with a concatenation of shop.url and a path: you risk losing the language prefix. If a translation or SEO app adds its own tag, keep a single source.
PrestaShop
Versions PrestaShop 8 and 9, Classic and Hummingbird themes.
The theme outputs the canonical in templates/_partials/head.tpl, from $page.canonical, which is computed for the current language. Check that a product page in German declares its German URL; an SEO module or a custom theme that writes its own tag must use the Link object with the current language's ID.
Magento
Versions Magento Open Source and Adobe Commerce 2.4.6 to 2.4.9.
Each language corresponds to a store view with its own URLs. In Stores > Configuration > Catalog > Catalog > Search Engine Optimization, at the level of each store view, set “Use Canonical Link Meta Tag For Categories” and “Use Canonical Link Meta Tag For Products” to “Yes”. The canonical is built with the store view's base URL: check that it contains the right language prefix or domain. Flush the cache in System > Cache Management.
Drupal
Versions Drupal 10 and 11, Metatag 2 module.
With the Content Translation and Metatag modules, the default canonical uses the [node:url] token, resolved in the language of the translation being displayed. In Configuration > Search and metadata > Metatag, check that the content “Canonical URL” pattern has not been replaced with a fixed URL, and that language detection by URL prefix is enabled (Configuration > Regional and language > Languages > Detection and selection).
Wix
Versions Wix Editor and Wix Studio with Wix Multilingual, November 2026.
Wix Multilingual publishes each language under its own URL and adds the hreflang annotations. Open the source code of a translated page and check the canonical: it must contain the language's prefix or subdomain. Only change it in a page's SEO settings for a duplicate.
Webflow
Versions Webflow with Webflow Localization, all site plans, November 2026.
With Webflow Localization, fill in “Global canonical tag URL” in Site settings > SEO (for example https://www.example.com): Webflow then generates a canonical for each page. Check in the published source code that a localized page does declare the URL of its subdirectory (/de/…). Do not fill in a static page's “Page canonical URL” field with the main language's URL: check its content for each locale.
Laravel
Versions Laravel 10 to 13; mcamara/laravel-localization 2 package.
With the language as a route prefix, url()->current() already contains the prefix. A resources/views/components/canonical.blade.php component:
@props(['alternates' => []])
<link rel="canonical" href="{{ url()->current() }}">
@foreach($alternates as $hreflang => $href)
<link rel="alternate" hreflang="{{ $hreflang }}" href="{{ $href }}">
@endforeach
The controller passes the URLs of each existing translation, for example ['fr' => route('pricing', ['locale' => 'fr']), 'de' => route('pricing', ['locale' => 'de'])]. Do not use config('app.url') followed by a path without a language. The Laravel Localization package provides LaravelLocalization::getLocalizedURL() to get a page's URL in another language.
Symfony
Versions Symfony 6.4, 7.4 and 8.x.
<link rel="canonical" href="{{ url(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}">
With localized routes, _route_params contains _locale: the generated URL is the one for the language being displayed.
Next.js
Versions Next.js 15 and 16 (App Router).
With the App Router and an app/[lang]/ segment, declare the canonical and the alternates in each page:
// app/[lang]/tarifs/page.tsx
import type { Metadata } from 'next';
const paths: Record<string, string> = {
fr: '/fr/tarifs',
de: '/de/preise',
en: '/en/pricing',
};
export async function generateMetadata({ params }: { params: Promise<{ lang: string }> }): Promise<Metadata> {
const { lang } = await params;
return {
alternates: {
canonical: paths[lang],
languages: paths,
},
};
}
metadataBase, defined in the root layout, makes these paths absolute. Do not put alternates.canonical in app/[lang]/layout.tsx: every page would inherit it.
Nuxt
Versions Nuxt 3 and 4, @nuxtjs/i18n module 9 and 10.
The @nuxtjs/i18n module generates the canonical, the hreflang tags and og:locale with useLocaleHead(), provided you set baseUrl:
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@nuxtjs/i18n'],
i18n: {
baseUrl: 'https://example.com',
strategy: 'prefix',
locales: [
{ code: 'fr', language: 'fr-FR' },
{ code: 'de', language: 'de-DE' },
],
},
});
In the layout, call useLocaleHead() and pass its result to useHead() (or inject head.link into <Head>). Query parameters are stripped from the canonical by default; list the ones to keep in the seo: { canonicalQueries: [...] } option of useLocaleHead().
Astro
Versions Astro 5 to 7.
With Astro's i18n routing, Astro.url.pathname contains the language prefix:
---
// src/components/Canonical.astro
const canonical = new URL(Astro.url.pathname, Astro.site).href;
---
<link rel="canonical" href={canonical} />
Set site in astro.config.mjs, otherwise Astro.site is empty.
Common mistakes
- Canonical to the main language on every translation: they are treated as duplicates and no longer show up.
- Relative canonical or canonical without a language prefix, generated from a shared configuration (
APP_URL,shop.url). - Canonical and
hreflangthat do not point to the same URL for a language (trailing slash,www, old slug). - Self-referencing canonical on a page whose body is not translated: it is a duplicate of the original, which Google will group with it.
- Canonical field copied from the original to the translations by the translation tool.
- Two canonical tags, one from the theme, the other from the translation plugin.
- Cache shared between languages: one language's canonical served on another language's URL.
Frequently asked questions
Should a translated page have a canonical to the original page?
No. A translated page must declare its own URL as canonical. Google only considers language versions to be duplicates if their main content is in the same language, so a real translation is a separate page. The versions are linked to one another with hreflang. A canonical to the original would ask Google not to index the translation.
What is the difference between canonical and hreflang?
The canonical designates, among several URLs with identical content in the same language, the one that should be indexed. Hreflang links equivalent pages in different languages or regions, so that Google shows each user the right version. On a multilingual site, each translation has a canonical to itself and hreflang annotations to all equivalent versions, itself included.
Do you need a self-referencing canonical if the site already has hreflang?
Yes. Hreflang does not replace the canonical: it does not protect the translation against its own duplicates, such as URLs with tracking or sorting parameters. Google recommends specifying a canonical page in the same language when you use hreflang. A self-referencing canonical on each translation settles both points and keeps signals consistent across tags, headers and the sitemap.
Resources
- Google Search Central: How to specify a canonical URLdevelopers.google.com
- Google Search Central: What is canonicalization?developers.google.com
- Google Search Central: Tell Google about localized versions of your pagedevelopers.google.com
- Shopify: International SEO for marketshelp.shopify.com
- Next.js: generateMetadata and alternatesnextjs.org
- Nuxt i18n: SEOi18n.nuxtjs.org
- Adobe Commerce: Catalog configuration and SEOexperienceleague.adobe.com
Updated on
Topic checklist (PDF)