The magic of canonical links
First, let's understand the power of canonical links. They allow you to assign content that is accessible under different URLs to one main URL - the so-called Canonical URL. This way, you avoid duplicate content that can make your website look confusing and inferior in search results. A simple example: a certain page is accessible under both `www.meine-webseite.com/beispiel.html` and `www.meine-webseite.com/de/beispiel.html`. In order to index Google cleanly, add the following statement in the HTML source code on both pages:
<linkrel="canonical"href="http://www.meine-webseite.com/beispiel.html" />
Fatal mistakes and their consequences
Now that you know the importance of Canonical links, let's take a look at the most common mistakes you should avoid at all costs to avoid getting into SEO trouble:
1. Using relative URLs instead of absolute ones
A big mistake is to use relative URLs in the Canonical tag. This leads to undesirable effects as Google may misinterpret the URLs. Make sure to always use absolute URLs that contain the protocol, e.g. `https://www.meine-webseite.com/beispiel.html`.
2. Canonical link for paginated content that links to the first page
For paginated content, a canonical link to the first page is illegal. Instead, you should use `rel="prev"` and `rel="next"` to clarify the relationship between the pages.
3. Setting multiple canonical links
The use of content management systems can lead to the automatic setting of canonical links. Be careful not to set additional links manually to avoid conflicts.
4. Canonical points to a 404 page
Careful selection of the canonical link is crucial. Make sure it does not point to a non-existent page, as Google may then remove it from the index.
5. Canonical points to a blocked page
If the Canonical link points to a URL that is blocked by the `robots.txt` or `noindex` directive, the page may not be indexed or may appear in search results without a description.
6. Canonicals with different content point to one page
A common mistake is that website owners believe they can use canonical links to bundle the "power" of several pages and concentrate it on one page, in order to then position it particularly well in the rankings. Merging different content via canonical links often results in all pages disappearing from the index except for the one to which the canonical link points. Use canonical links only for pages with identical content.
7. Canonical link in the body
Make sure that the canonical link is always placed in the `` area of the HTML code so that Google takes it into account. In the `` section of the HTML code, the Canonical link is ignored by Google and Bing.
8. No Canonical when using URL parameters
On pages with URL parameters, use a Canonical link pointing to the URL without parameters to avoid duplicate content.