Canonical tag

The canonical tag was introduced in 2009 – why? One of the biggest challenges for search engines is duplicate content. Identical or very similar content under different URLs means that search engines like Google crawl unnecessarily many pages and ranking signals are split across several addresses. The canonical tag helps: as an HTML element in a page's source code, it indicates which URL is the original. This tells the crawler that the canonical (preferred) URL should be indexed for the content. There is no guarantee, however: Google treats the canonical as a strong hint but decides for itself – and follows it above all when internal links, sitemap and redirects send the same signal.
Use cases for canonical tags
The canonical tag is used against duplicate content. Typical situations: pages can be reached via different URLs (with and without www, with and without a trailing slash), URLs contain parameters for tracking, sorting or session IDs, or there are print and PDF versions. Online shops add filter and sort pages as well as product variants that, depending on the shop system, generate their own URLs. Content that is also published on other portals – press releases, for example – can point to the original source via a canonical.
The canonical URL is specified in the head section of the source code so that search engines recognise it immediately. The canonical tag consists of a link element with the attribute rel="canonical" and looks like this in the source code: <link rel="canonical" href="https://www.example.com/example-page" />. Always specify the full, absolute URL – with protocol and the preferred domain variant. Otherwise, relative or incorrect entries can lead to misunderstandings during indexing.
When a canonical tag doesn't help
Canonical tags are important, but they don't solve every problem. Content theft is one example: if someone copies your content and publishes it under another URL, you can't set a canonical tag there. It is also out of place on pages with different content – for example, when all pages of a pagination point to page 1. The products on the following pages may then no longer be found. And a canonical pointing to a page that is itself set to noindex or redirects sends contradictory signals.
An alternative to the canonical tag: the 301 redirect
If a duplicate URL is no longer needed, a 301 redirect to the main page is often the better solution: visitors and search engines land directly on the right address, and the signals are consolidated. This also applies to synonyms: instead of creating several categories with the same products – such as “mobile phone” and “smartphone” – one strong, well-optimised page is usually the better choice. The canonical tag, on the other hand, is the right solution if both URLs should remain accessible to users, for example with filters or tracking parameters.