What is a canonical tag?

Since the emergence of Sitemaps, the greatest development in SEO is perhaps the decision by top search engines that they will support Canonical Tags to assist webmasters to deal with duplicate content. A canonical URL assists a webmaster in telling search engines that several pages/ posts are the same. For example, it is not uncommon to get products with multiple URLs as it happens in many e-commerce websites. When you use a canonical URL, rest assured that duplicate pages will not affect the website ranking and authority.

What exactly are canonical tags?

A rel=canonical element (commonly referred as a canonical link), is a unique HTML element for assisting a webmaster to avoid issues related to duplicate content. This is done by specifying the canonical URL or the preferred page/site. If you use the canonical tags well, the site’s SEO will improve significantly.

Here, the principle is very simple: When there are several versions of your page or websites, you select a canonical version and direct the search engines there. This means that you will eliminate the problem faced by most search engines especially when they do not know what version to crawl and index. Consider setting your website’s canonical to be similar to doing a 301 redirect without redirecting in the real sense.

The rel=canonization process

When your website, product, page, or post has several URL versions, you pick the right one through canonization. In many instances, one URL is better compared to others. However, there are other instances when picking one option is never easy. Failing to canonize the URLs is more difficult compared to canonizing them.

Setting canonical tags

To get the picture of this clearly; let assume that you got two completely identical pages (100% duplicate). The sole difference is that they are located on various sections of your website and background themes. The most important thing is that both versions of the page are critical because they have been linked from other sources. In such a case, the search engines would be torn on the page to index.

An example of two similar pages:

http://bestexample.com/wordpress/seo-plugin/
http://bestexample.com/wordpress/plugins/seo/

canonical tag

This is why rel=canonical was designed. In most e-commerce sites, this problem happens regularly when an item is added in several categories. Here is how to apply re=canonical to avoid the problem of duplicate pages.

Identify one of the pages and mark it as your canonical version. This should be the version considered more important or having more links.

On the canonical page, add the rel=canonical link from the non-canonical one. If we used the example above and selected the first(shorter URL) as the canonical, it would look like this;

<link rel="canonical" href="http://bestexample.com/wordpress/seo-plugin/" />

Now, you have combined the pages from the search engine’s perspective. Call it a sort of soft redirect without really redirecting visitors. With the canonical version of your URL, rest assured that every visit will count towards improving ranking.

If using a WordPress website, you can use appropriate Yoast plugin to set the canonicals easily and faster. While you have to do it manually on other platforms, Yoast provides the correct canonical URL for almost all types of pages in WordPress. Indeed, you can even edit pages, posts and other types of pages on your Yoast SEO meta box. In the case that your situation is advanced, consider using wpseo_canonical that helps to change the output of the Yoast SEO.

When exactly should people use canonicals?

The best practice in case of 301 errors

If your page is returning 301 error (page moved permanently), you have to consider whether the best option is using a canonical or setting a redirect. If you don’t have technical issues for applying redirects, the best thing is actually redirecting. However, if the page has some traffic or you fear it will be problematic, it is advisable to set rel=canonical tags.

Self-referencing canonical to URLs

Recently, the debate on whether every page should set a rel=canonical on its own has become a hot one. However, Google has confirmed that it is a great idea and indeed the way to go. This is because most CMSes allow various URL parameters as far as the content does not change. Because of this general rule of the thumb, the following URL would point to the same piece of content.

http://bestexample.com/wordpress/seo-plugin/
http://bestexample.com/wordpress/plugins/seo/

If you lack an appropriate self-referencing canonical pointing to the preferred version, search engines might end up indexing the page that will not count your ranking. Note that even if you fail to do that, a different person can create similar content and redirect the traffic to his page. This means that including a self-referencing canonical to your entire site’s URLs is the way to go. Notably, the Yoast SEO plugin does this for you.

Sharing contents across domains

If you have some content you want to use from a different website, what is the best way to get a win-win situation for both parties? When you use cross-domain canonical URLs, it is possible to take an article from website A and show it to visitors in website B. The visitors in website B will benefit from the article while credit will go to website A. It is a win-win situation for both.

Damaged canonical URLs: The main issues and how to address them

Many are the times when cases of the poorly done rel=canonicals led visitors from home pages to totally unrelated articles. To address these problems and others, it is important to avoid doing the following with rel=canonicals.

  • Do not canonize any paginated archive to page one. You must be extra careful to ensure that the Rel=canonical on page three only points to page three and not page one or two.
  • Ensure that all re=canonicals are specific. Many are the times when webmasters leave out important bits such as https /HTTP from their URLs. You should never leave out the specifics when implementing a canonical.
  • Always structure the canonicals based on request URL. If you are utilizing variables such as domain or request URL to get access to the present page when generating canonicals, know that it is the wrong method. You might end up with an issue such as content for www.example.com and example.com being canonized! Every piece of content should be cognizant of its own URL.
  • Multiple rel=canonical linking to your site. It is not uncommon to get extensions and plugins developers adding canonical tags to every page. Well, while it may be okay in some cases, it is not always the best thing. In many cases, they are very wrong, and the results can be very unpredictable.

Re=canonical is one of the most powerful tools in SEO. However, the tool should be used with a lot of care because it can hurt you in a great way. For those with bigger sites that have many pages, rel=canonization can help to get major improvements.

Say Hello! Don’t be shy.