Blog

Canonical Tag

What is a Canonical Tag?

The Canonical Tag is an attribute that helps a search engine to correctly classify duplicate content published on multiple URLs on the web. Often, the attribute is used incorrectly, so that search engines are confused and there are problems with indexing. You can find out here how to use the Canonical Tag correctly and which mistakes are often made.

What is the Canonical Tag?

The Canonical Tag has been used since 2009 by various search engines (Google, Bing, Yahoo) to inform a search engine of a preferred version for URLs with the same or very similar content. The main URL is also called a “canonical URL”. If a URL with the same content refers to the main URL via Canonical Tag, a search engine knows which URL should be displayed in the search results, i.e. indexed, and which URL is the duplicate. Otherwise, both URLs may end up in the index and take away each other’s rankings. This makes it difficult for Google to understand which URLs should rank for the optimised keyword

We are talking about cannibalisation at keyword level, so to speak. It should be said, however, that a canonical tag is also often ignored by search engines if it is used incorrectly.

How is a Canonical Tag structured?

The attribute is marked in the head area of a source text within a link element and looks like this:

<link rel=“canonical” href=“https://example.com/sample-page/” />

There is only ever one canonical tag on a page. If the canonical tag is used more than once on a URL, these are ignored by the search engines and the page is still included in the search engine index.

Google’s Webmaster Central blog also recommends the following in use with the Canonical Tag:

  • Checking the content on the web pages for actual similarities.
  • Avoiding 404 errors of the canonical URL (Screaming Frog is best suited here)
  • Ensure that the canonical URL does not contain a “no-index” robots meta tag.
  • Checking the canonical URL for indexation instead of the duplicated URL (this can be done quickly using a site query in the Google index)
  • Never use more than one canonical attribute per page.

Use cases of a Canonical Tag

A canonical tag is used when content is used on several URLs or a unique URL is not possible for technical reasons. Here are a few use cases when Canonical Tags should be used:

  • If a page can be reached via various URLs, for example http://www.domain.com, https://www.domain.com, http://domain.com, https://domain.com, https://www.domain.com/index.php, the Canonical Tag can be used – in this case, however, it is best to redirect all variants to the main URL using a 301 redirect.
  • For URLs that can be reached with or without a trailing slash (“/”) or in upper or lower case and that output a 200 status code.
  • When using session IDs or product filters (parameters) within a shop, but which do not change the content.
  • If the content is offered e.g. in a print version or also as a PDF file.
  • When using http and https variants. Here, however, it is better to opt for one resource – namely https, which has been an important ranking factor for Google since January 2017.
  • Additional publication of content on external websites.

John Mueller from Google gave the hint that one should use the Canonical Tag next to pages with duplicate content (e.g. pages with parameters) on all pages, even without duplicate content, so that it is even clearer for the search engine that there is no duplicate of this version and that the resource is the original version.

Frequent errors in connection with Canonical Tags

The Canonical Tag is a powerful tool. However, there are a multitude of cases where the attribute can be applied incorrectly, resulting in errors within the indexation, which means a problem for the entire domain. Here are the most common mistakes and how to do it right.

Canonical tag vs. pagination

Starting point: A category page has numerous products that are stored on several paginated pages.

www.domain.com/category/

www.domain.de/

www.domain.com/category/?page=2

www.domain.com/category/?page=3

www.domain.com/category/?page=4

etc.

These pages are marked via rel=”next” and rel=”prev”. Each paginated page refers to the main URL (first page) via the canonical tag.

Why wrong?

If the canonical tag is used here, the search engine cannot index the contents of the paginated pages and cannot follow the pages linked there.

Therefore, if you have paginated pages, you should:

1. When using the Canonical tag, point to a URL where all products are listed.

Example: domain.com/category/?page=all

or

2. use rel=”next” and rel=”prev” on the second page in conjunction with “no-index

Absolute URL vs. relative URL

In the Canonical Tag, absolute or relative URLs can be used, but relative URLs refer to a path starting from the current website.

The specified, original URL (relative URL) has no http:// and assumes the canonical URL “http://example.com/original-url/”, which is therefore incorrect and the crawler lands on a 404 page.

Relative URLs such as /original-url/ should also be used as canonical URLs.

Use the entire, i.e. absolute URL instead.

Canonical vs. hreflang

Those who use hreflang in conjunction with canonicals must now look very carefully. Because if the two attributes refer to different paths, wrong signals are sent to Google. The search engine then tries to help itself and decides on its own which page should be included in the index.

Conclusion:

When using the canonical tag, utmost care must be taken, because you can make gross mistakes here that will have negative consequences.

Leave a Reply

Your email address will not be published. Required fields are marked *