A canonical tag is used to tell search engines which version should be indexed. For example, you have a website with T-Shirts:
- /shirts
- /shirt/white/L
- /shirt/white/XL
- /shirt/red/L
In this situations you can use a canonical tag on all pages that point to /shirts, like:
<link rel="canonical" href="/shirts">
If you have a multilingual website, your structure can look like this:
- /en/shirts
- /en/shirt/white/L
- /en/shirt/white/XL
- /en/shirt/red/L
- /nl/shirts
- /nl/shirt/white/L
- /nl/shirt/red/L
- /de/shirts
- /de/shirt/white/L
In this case, you will have to use the href alternate tags in combination with the canonical tags, this will result in:
For English:
<link rel="canonical" href="/en/shirts">
<link rel="alternate" hreflang="en" href="/en/shirts" />
<link rel="alternate" hreflang="nl" href="/nl/shirts" />
<link rel="alternate" hreflang="de" href="/de/shirts" />
for all English shirt pages
For Dutch:
<link rel="canonical" href="/nl/shirts">
<link rel="alternate" hreflang="en" href="/en/shirts" />
<link rel="alternate" hreflang="nl" href="/nl/shirts" />
<link rel="alternate" hreflang="de" href="/de/shirts" />
for all Dutch shirt pages
For German:
<link rel="canonical" href="/de/shirts">
<link rel="alternate" hreflang="en" href="/en/shirts" />
<link rel="alternate" hreflang="nl" href="/nl/shirts" />
<link rel="alternate" hreflang="de" href="/de/shirts" />
for all German shirt pages
Regards, Peter