When searching for ways to improve your website’s SEO, you must have come across the terms canonicalization, canonical URL, or canonical tag. On the surface, canonicalization seems like a difficult thing to do. However, if you take the time to really understand it, you will realize canonicalization isn’t difficult or confusing at all.
In this post I will try to answer all your questions about what a canonical tag is, the importance of canonicalization in SEO, when to use these tags, where to use them, etc. So, let’s dive into it.
What is a Canonicalization?
First off, let’s answer the big question. What is a Canonicalization?
Canonicalization is the process of using the rel=”canonical” tag to deal with duplicates of a page. With this, you can ensure that the page you don’t want to show up in the search results doesn’t show up.
Now, this raises two questions, what is a rel=”canonical” tag, and why would we want some pages to not show up in the search results.
Let’s take them one by one. First, why would we not want some pages to show up in the search results?
What is the Importance of Canonicalization in SEO?
If you have a website, you will, at some point, have duplicate pages. It may be for any reason. Some of the common reasons are:
- You redesigned your website, and as a consequence, there are many versions of your website’s pages.
- Google has started to show the URL that’s been shared a lot on social media as that URL is getting more traffic.
- Maybe your website enables people to use filters that create thousands of duplicate pages for the same website.
- Maybe, you have both the www version and non-www version of your URLs.
Leaving these duplicate pages as it is can be harmful to your website and SEO. This is because firstly, you will end up wasting money on crawl budgets. The more pages you have to crawl, the more costly it is. Second, duplicate content can lower your rankings because the number of clicks is split between different pages. It may also be that your users open a low-quality page and leave with a bad impression of you.
So, to fix all these problems, we use canonical tags.
What is a Canonical Tag?
The rel=” canonical” tag is a snippet of code found in the head section. It is used to tell the search engines which page is the master or main page. So, if you use this tag, you are essentially telling search engines, “The page you are on exists, but this is not the main page. The URL in the rel=”canonical” tag is the main page. Use that URL to give us a ranking.”
Now, using this tag generates a canonical URL, which is the URL representing the duplicate pages.
Canonical URL is the URL of the page that Google thinks is most representative from a set of duplicate pages on your site.Google Search Console
So, the tag is what you will use to tell Google and other search engines which page is the main page. The URL in the tag is the canonical URL. Often you will see these two terms being interchanged, but they shouldn’t be as they are in fact two different things.
Now, if you pay close attention to Google’s definition of canonical URL, you will notice that the canonical URL really depends on Google and not us (…Google thinks is the most representative…). The canonical tag just acts as a suggestion and not a direction.
Canonical URL example
Suppose you have a website with the domain xyz.com. Now, your main page is xyz.com/, but you also have a duplicate of that page with the URL https://xyz.com/a. Now, to tell search engines that the page with /a is not the main page but a duplicate, you will have to use the canonical tag on the /a page. The code will be something like this,
<link rel=”canonical” href=”https://xyz.com/”>
Now, obviously, your head section will have a lot of other lines of code. This is just an example of how the canonical tag will look in the head section if there was nothing else there.
When to Use a Canonical Tag?
Since there are many reasons why you wouldn’t want certain pages to show up, there are different ways you can deal with those URLs. So, the question arises, when should you use the canonical tag.
You should use it if
- You have multiple pages with extremely similar or the exact same content.
- If the searchers’ intent is the same.
- You republished, updated, or refreshed your content on a new page.
- You have expired content, product, event, etc. and there is a next best version. However, this is usually done with a 301 redirect.
There are other methods to deal with duplicate content and I will not be going into that. If you want to know more you can read about the different methods here.
How to Add a Canonical Tag in WordPress?
Now, that you know what canonical tag is and the importance of canonicalization in SEO, you must be wondering how you can add these to your website.
If you have access to the code, you can simply copy-paste the following tag in the head section.
<link rel=”canonical” herf=”https://yourwebsite.com/>
Remember to change https://yourwebsite.com/ to your desired URL.
Here I am using Rank Math for illustration.
Go to the advanced section in the right-hand tab. Here you will see the option to add a canonical URL. All you need to do is type in the URL and click save.
If you want to redirect to another page, toggle the redirect option. Select the redirection type and enter the URL.
Which Version to Use – www or non-www?
If your website has both a www version and a non-www version, then it’s best if you choose one and canonicalize the other to it. Now, both these versions by themselves don’t really affect SEO so either is fine. However, if one version is already receiving more traffic than the other, then choosing that would be the best option.
To find out which version to use you can crawl your website using a link analysis tool like AHERFS.com, magistic.com, etc. Pick the version that has more visitors and canonicalize to it. Also, make sure to change all the internal links too.
- If you want to check if your website is using canonical tags or redirects you can do so on SEOSiteCheckup or SiteChecker for free. These are not the only canonical checker tools, there are many others.
- You can canonicalize your main page, it won’t cause any problem. In fact, you should canonicalize your homepage to itself.
- These tags are a suggestion and not a command or a directive, so Google has the option of not canonicalizing if it sees fit.
- Don’t give mixed signals by canonicalizing two pages to each other or 301 redirecting one page to the other and canonicalize that page to the first one.