How to Use the Canonical Tag

Why Use the Canonical Tag?

The canonical tag primarily serves as the way to uniquely identify a web page. On your website, you might have several URLs that take you to exactly the same web page with the same content. Maybe some of these URLs include parameters that do not change the content of the page. Even if you don't have this happening now, you cannot be sure that this won't happen in the future. So, what is so wrong with having different URLs that deliver the same content? Search engines see the URLs as different pages, which means that the reputation of that page's content will be split into those URLs. Additionally, these pages might be penalized for being duplicates. Using a canonical tag solves this issue because it allows you to tell the search engines that a particular URL is the most correct for this content.

Setting the Canonical URL

Once you decide to start using a canonical tag to uniquely identify your web pages, you need to figure out the best way to set the canonical tag for each page. It is usually best to set the canonical tag to the most simple and concise URL. Since each URL takes you to the same page, all you need to do is to place the canonical tag that is set to the best URL inside the head tag of your web page. Regardless of the URL, the same canonical URL tag will be displayed, which will tell the search engine that that canonical URL is the best URL.

Canonical Tag Example

In this example, we want to set every URL that points to the same content that is on to have a canonical tag set to the URL "".

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

Canonical Caution

Setting canonical tags provides an excellent way to prevent duplicate content penalties, but it must be used properly. Sometimes, URLs might display the same page but in a slightly different manner. For example, you might have URL parameters that serve as facets that change the order of the page's contents. In this situation, it is probably still the best to use one unique URL in your canonical tag for all of those URLs. Simply because the text is rearranged on the page is not usually a sufficient reason to use different canonical tags for each URL.

Search engines do attempt to solve this multiple URLs pointing to the same content problem. However, search engines might see this as a website attempting to be deceptive just to create more "pages" with different URLs. The deceptive idea is that if you have more web pages regardless of the duplicate content, the more likely your website is to be found in the search results. Of course, this is a terrible idea, and eventually, search engines will discover this behavior and penalize the website resulting in lower search engine result placement than if they had only created one page with one URL. Thus, it is better for you to set the canonical tag before the search engines decide that your website is trying to be deceptive.