Canonical tag: definition, when to use it, and common mistakes

Canonical | 

HTML is a markup language that is based on the use of tags and that is the basis of web development. For SEO, the use of many of these tags is essential to be able to optimize a website and get Google to position it in a better place on its results pages.

The canonical tag is one of the most interesting because it allows you to directly suggest to Google the importance of that URL in relation to a certain keyword for your web positioning.

Table of content

What is a canonical tag?

The canonical tags are a markup that is made in HTML to indicate that the content of a URL is original. It is an indication or suggestion so that search engines can understand which page to show to users of a website in relation to a specific search intention.

These tags were introduced in an update of the HTML language in 2009, with the aim of providing web developers with a tool with which to avoid duplicating content on their websites.

What is a referenced canonical tag

One of the main characteristics of canonical tags is that they are referenced, that is, that the URL they point to can be both the URL itself, and another different URL. This is a great advantage for SEO because it allows you to indicate to Google from a specific URL, which other URL is more relevant to the position for a search intention.

The canonical tag also works between domains so you can pass credit from a URL to a page on another domain.

What is the difference between canonical tag and canonical url

These two related terms tend to be confused but refer to different concepts. A canonical URL is a page that Google considers the most representative of a web, within a group of URLs with similar content or that are trying to be positioned by the same keyword.

The canonical tag is an HTML tag to tell Google what the canonical URL is. As it is a suggestion, Google can choose to accept that suggestion and consider the URL indicated in the canonical tag as the most important, or take its own judgment and decide for itself what the canonical URL is.

How is the conical tag implemented?

The canonical tag is easy to implement on a website, either by editing the HTML code of the page, or using a plugin if the website is created with WordPress.

Configure canonicals using rel = "canonical" HTML tags

The canonical tag of a page must go in the HEAD section of its HTML code. The format to include it is as follows:

				
					<link rel="canonical" href="URL">
				
			

This code is divided into three parts:

  • Tag to indicate that it is a link or URL.
  • rel attribute to indicate that the relationship of that URL is canonical.
  • href attribute to enter the URL to suggest as canonical.

It is important when entering the canonical URL in the tag, to consider if the site uses an SSL certificate to add HTTPS instead of HTTP. This error is common on many sites and prevents Google from recognizing the indicated canonical URL.

Configure canonical tags in WordPress

self-referencing (pointing to itself) on each page or post. This URL can be easily edited so that it can point to another page on the site.

In which cases should I use the canonical tag?

There are different situations where the use of canonical tags is recommended:

  • Point out similar or duplicate pages so that Google does not penalize them in their web positioning.
  • Indicate the URL that you want to show on the results page.
  • To avoid keyword cannibalization, indicate which URL has priority for positioning.
  • To consolidate the positioning of a page between different domains.

Errors to take into account in the canonization of URLs

Here are a number of errors to avoid when using canonical tags on a page.

Mobile and desktop versions

Sites that use different URLs for mobile and desktop often make the mistake of self-referencing them in their canonical tags, so Google can interpret both pages as duplicate content.

To avoid this, you have to say which of the two will be the canonical URL and reference it from the canonical tag of the other URL.

Use multiple canonical tags

The objective of the canonical tag is to indicate to Google that a URL is the original one, so using several canonical tags in the same URL that point to different pages, is like telling Google directly that it is duplicate content.

Do not use noindex

In cases where you don’t want to index one of the similar pages, using the canonical tag is less effective than using noindex. The canonical tag is a suggestion, so Google may choose to ignore it and end up indexing your content. With the noindex tag, in these cases, duplicate content is avoided and that URL is indexed safely.

The canonical tags are a technical SEO tool that have a certain difficulty when used properly, so their use must be done in a conscious and planned way to avoid being detrimental to the positioning. They are essential elements to avoid situations that penalize web positions such as content duplication or keyword cannibalization.