Right when you thought you were on top of your SEO game, here’s “canonical tags.”
Are you wondering what they are? Why should you learn about them, and when should you use them?
There are many instances where you might have different URLs that lead to the same page or an almost identical page. It could be that you have multiple URLs pointing to the same product or something else. But that presents a problem. The search engines don’t like ‘duplicate content,’ penalizing a page if they find any duplication. It means that you have to tell the search engines which one of those pages is original and which ones are not. That is where canonical tags come into play.
What are Canonical Tags?
The word ‘canonical’ does sound complicated. Especially if this is the first time, you hear about it. Canonical tags are just snippets of HTML code that tell your search engine which version of the page or URL to consider as the primary one and which ones to ignore. If you want to avoid any penalties for duplicate content, this is something that you must master. Another great advantage that you get is that you don’t have to implement complicated redirects. Canonical tags make it all easy. Read on to find out the what, why, and how of canonical tags. We will tell you three ways to specify canonical pages to ensure that you never have to face any SEO issues with the search engines. As far as a beginner’s guide to canonical tags goes, you’ll find this one extensive yet easy to understand.
How to Specify a Canonical Page
We have already discussed what a canonical page is and why you should use it to duplicate pages or URLs on your website. Now, let’s get into the how of it.
How do you specify a canonical page?
There are various ways that you can tell a search engine which page to consider. Each method has its advantages and disadvantages. Here, we will discuss three of them and see which one suits you best.
1. The rel=canonical Tag
It is a straightforward way of tagging your webpage with a bit of code. It’s simple HTML that you can add, and it will inform the search engine about the canonical version of the page. For example, let’s say that you have three almost identical pages. Their URLs are:
Here we have an eCommerce website that has three different URLs for the same product. What we need is to set the primary URL. Just add the ‘rel=canonical’ tags to the other two pages and point to the first one. Just open your second page’s HTML source and locate the <head> section. Once you find it, add the following code between the <head> and </head> tags. It will look something like this:
<link rel=”canonical” href=”myecommercesite.com/shop/blak-bike-gloves” />
Now save the file and do the same thing with the third page. As easy as it sounds, it does become quite repetitive when you have loads of similar pages. The good thing is that it is easy to do, and it doesn’t increase the file size, which means the performance of the page remains the same.
2. Use HTTP Headers
There are certain times when you don’t have a <head> tag in your file. You might be using a pdf or something else. Additionally, sometimes you may not have access to the <head> tag in your file. When this happens, you could use the HTTP header instead of the <head> tag.
For this purpose, you will need access to your website’s .htaccess file. This file is usually in the root folder of your website. To get to it, you will need to use FTP (File Transfer Protocol). We are sure that you already have an FTP client set up. If you don’t, please do so now.
Once you’ve done all that, open the .htaccess file. You will see that there is some code in the file already. Depending on your server’s configuration, there could be fewer codes or a lot. Just make sure that you don’t change anything in the file that’s already there. A good practice is to create a backup of the file, just in case. Once your backup is ready, open the original file and add the following code at the end:
Header add Link “< http://myecommercesite.com/shop/ >; rel=\”canonical\””
3. Use Your Sitemap
We have saved the best for last. Well, maybe not the best, but the least time-consuming and the easiest. We all know and use sitemaps on our websites. They tell search engines which URLs are on the website, so the search engines don’t miss any page. Another benefit of using sitemaps is that Google considers all the URLs in the sitemap to be canonical. All you have to do is include your primary link in the sitemap and leave out all the rest. It saves immense time and effort. One problem that you might have to consider is that it is not a confirmed strategy. Google takes it as a ‘suggestion’ rather than something concrete.
Search engines can penalize your website for a wide variety of things, and duplicate content is right at the top. But if you use canonical tags, you can proactively handle the situation and highlight the original page. Although, it is complex to digest all the information at once. We recommend that you use a combination of the methods given above for desired results.