The canonical tag is a line in the header area of a page that tells Google which address counts as the original when the same content can be reached under several addresses, for example with and without www, with parameters, or as a print version. Google treats it as a strong hint, not a command. Set correctly, it pulls signals together on one address. Set incorrectly, for example pointing to a redirect or to the homepage, it can make pages disappear from the index.
The same page on your website is probably reachable under more addresses than you think: with and without www, with and without a trailing slash, with a tracking parameter from the newsletter, as a print version. For visitors, this doesn't matter. For Google, these are separate addresses with identical content, and Google has to decide which one makes it into the results list. The canonical tag takes that decision away from Google.
What the tag does
In the header area of a page there's a line of the form <link rel="canonical" href="https://www.beispiel.ch/ratgeber/waermepumpe-kosten/">. It says: whatever this page is, the original is located at this address. Google then pulls links, signals and ranking together on the original and doesn't show the variants separately.
Google describes the tag in its documentation as a hint, not an instruction. If other signals contradict it, for example because the sitemap and all internal links point to the variant, Google can choose a different address as canonical. This is why canonical, internal links, sitemap and redirects all need to name the same address.
The typical cases
| Case | Example | Canonical points to |
|---|---|---|
| With and without trailing slash | beispiel.ch/kontakt and beispiel.ch/kontakt/ | The version that's linked everywhere |
| www and without www | www.beispiel.ch and beispiel.ch | The main version, also redirect with a 301 |
| http and https | http://beispiel.ch | Always https, also redirect with a 301 |
| Parameters | beispiel.ch/ratgeber/?utm_source=newsletter | The address without parameters |
| Sorting and filters in the shop | shop.ch/arbeitshosen/?sort=preis | The unfiltered category page |
| Print version | beispiel.ch/ratgeber/drucken/ | The normal view |
| Product variants | The same product in three colours under three addresses | The main version, if the text is identical |
| Republication | Your post on an industry portal | Your original on your own website |
| Capitalisation | beispiel.ch/Kontakt | The lower case version |
For the first three cases, the canonical is only the second safeguard. The first is a 301 redirect to the main version, so that only one address can be reached at all. With parameters, filters and print versions, both addresses need to work, and that's where the canonical is the right tool.
An example from everyday blogging
A painting business sends out a newsletter with a link to the new post, tagged with parameters for tracking performance. Fifty readers click, some share the link further, and an industry portal links to the parameter version. Without a canonical, Google now has two addresses with identical content and incoming links. With a canonical pointing to the clean address, all signals come together there, and the tracking still works because the parameter stays in the browser.
Mistakes that happen often
- Canonical pointing to a redirect: the canonical address redirects itself. Google has to guess, and the page often falls out of the index. The most common error after a relaunch.
- Canonical pointing to the homepage on every page: some themes and plugins set this incorrectly. The result: Google treats every subpage as a copy of the homepage and only indexes that one.
- Canonical pointing to a 404 page or a page with noindex: contradictory, Google usually ignores the tag then.
- Relative address in the canonical:
/ratgeber/instead of the full address with https. This sometimes works, but it's error-prone. - Two canonical tags on one page, for example from the theme and from the SEO plugin: Google then evaluates neither of them.
- Canonical pointing to http while the website runs on https: a leftover from old settings.
- Canonical between pages with different content: two different guides should never point to each other. That's a case for merging or separating, not for the canonical.
Check in two minutes
- Open the page in your browser, view the source code (right-click, "View page source") and search for "canonical". There should be exactly one line, with the full https address, pointing to a reachable page.
- Call up the canonical address itself: does it respond directly with the page, without a redirect?
- Start the URL inspection in Search Console. Under "Indexing" there are two lines: "User-declared canonical URL" and "Google-selected canonical URL". Both should match.
- Open the sitemap and check whether the address listed there matches the canonical.
If Google's choice and your own declaration differ, there's almost always a conflicting signal: a link, a sitemap line or a redirect pointing to the other variant.
What to do with this
Decide once how your addresses should look: https, with or without www, with or without a trailing slash. Redirect all other variants to that one using 301s, and let the CMS set a canonical to itself on every page. After that, you only need to check the tag after a relaunch, a theme change, or when Search Console suddenly reports many pages under "Duplicate".
Frequently asked questions
Does every page need a canonical tag, even without duplicates?
Yes, recommended, as a canonical pointing to itself. This protects against duplicates you can't see, for example from tracking parameters in newsletter links or capitalisation in the address. Most CMSs set this self-reference automatically.
What's the difference between canonical and a 301 redirect?
With a redirect, the visitor ends up on the other address, and the old one is no longer accessible. With a canonical, both addresses remain reachable, but Google should treat one of them as the original. Use a redirect when the old address is no longer needed; use a canonical when both variants need to work for visitors.
Can I use the canonical to point to a different website?
Yes, this is called a cross-domain canonical and is the right approach if you're republishing a post on a partner site or a portal. The republished version then carries a canonical pointing to your original. Google usually follows this, but doesn't guarantee it.
Why does Google choose a different canonical address than the one I specified?
Because the tag is only a hint. If internal links, the sitemap and redirects point to a different address than the canonical, Google often follows the majority of signals. Check the URL inspection to see which address Google has chosen, and bring all signals in line with the same address.