How do I add a canonical tag in WordPress 2030
Probably you heard about only On-Page SEO or Off-Page SEO, but I think you must aware of What is Canonical tag which is part of technical SEO.
Have you ever thought of technical SEO, there you can prevent the ranking of the duplicate pages or content of your website?
If no, then I am going to answer what is canonical tag or canonicalization and how to add the canonical tag in WordPress to avoid duplicate page ranking or passing wrong link juice equality.
Before reading forward, do remember that Google uses its spider or Google bot to visit the web pages and online content.
The first thing which Google Bot or Spider visit or refer is the URL of the post or pages.
And let imagine, if you have multiple pages with the same content and different URL then Google bot crawler gets confused and might rank the page which you don’t want to?
Well, I don’t want, do you want to rank unnecessary pages?
Even if you don’t then the solution to this problem is applying Canonical tag. Which can boost your site post or pages search engine ranking?
This guide has detailed all about What is Canonical tag, how to check the canonical tag, what is canonicalization, and how to add the canonical tag in the WordPress blog.
Let me first brief about, What is Canonical tag and why it is important?
What is Canonical Tag or Canonicalization?
Probably you have heard about the various tags you use to redirect the pages or link juice from one page to other such as 301 redirects, rel=”nofollow” etc.
All of them have their importance but canonical tag which usually mapped as rel=”canonical” has its different purpose than others.
A canonical tag is added with the web page URL in the <head> tag of the HTML code of the post or pages, which specify to Google crawler that this is the original URL.
This is how it looks like:
<link rel=”canonical” href=”http://bloggingos.com”/>
Yes, it differentiates your original page from the duplicate pages.
This initiative was taken by Google, Microsoft, and Yahoo back in 2009 to avoid duplicate pages ranking and that is why must recommend using them.
Here you can refer to Google webmaster guideline on how this is important to use the canonical tag.
But when you should use a canonical tag?
Have you noted the difference, both URL A and URL B are the same but one is directly accessible, and the other is through category?
So the result is Google crawlers get confused about which URL to rank in search engines as both are having similar content.
If you have not specified URL A as canonical then the crawler will take any of his choice pages and start ranking the same.
And never confuse bot or any search engine crawler else you will ruin your SEO ranking.
This issue is mostly faced by e-commerce or multi-device optimized sites such as a common page on e-commerce sites that can have URLs such as:
https://mystore.com/t-shirts.html
But when the user selects any specific size or color on the same page then URL will change to another endpoint such as:
Size: https://mystore.com/t-shirts.html?Size=XL
Size & Color : https://mystore.com/t-shirts.html?Size=XL&color=Blue
Similarly, AMP and non-AMP pages, Mobile or non-mobile version URL of the site all are part of the original URL containing the same content but different URL format.
To avoid confusion and best search engine ranking, it is advisable to use rel=”canonical” with the main URL to tell crawler or bot yes I am the main page and willing to rank.
And also use the same <link rel=” canonical” href=”https://mystore.com/t-shirts.html”/> tag with other duplicate URLs to suggest Google that for all other this is the Main Page.
Now you are much excited and willing to know how to check the Canonical tag of any particular post, are you?
How to check Canonical Tag of Post or Pages?
Finding a Canonical tag is a very much easier process for any post or pages but there is little bit awareness required.
That just specifying rel=”canonical” tag means not that Google will consider the same URL as original, yes in 99% cases but not all the time.
As it is a request, not a command, so be careful to check the same on two different places for higher accuracy.
At least I do check myself and you can also that for free of cost.
Check the HTML Code
The objective is simple to check that a particular URL which is ideally found in the <head></head> is having any rel=canonical or not.
For that simply open your post or page and Right-click to anywhere middle of the post content.
Out of available options, choose view page source code, then HTML code for the content will be displayed.
Then search for the rel=canonical in the <head></head> tag and if you found URL like seen below that means you are set this is the original page.
Well, if you have duplicated pages of the same then make sure all should have this URL pointing to original one means they are giving credit to the original.
Check in Google WebMaster
Checking the URL in webmaster is the only way to understand whether Google has considered that canonical tag or not.
It gives you an idea, which URL Google has inspected as Canonical for any particular page.
So log in to Webmaster then simply follow the below steps.
- Click to URL Inspection
- Enter the Blog post or Page URL
- Click to Coverage dropdown Icon
- Validate the URLs
What we declared in our HTML code or anywhere will display as well as what Google has finalized also display.
In the case of URL for Google Selected Canonical, is different than what user-declared.
Then you can consider that Google has counted different URLs then yours as Canonical URL.
Isn’t it simple to identify?
So till this point, you are pretty much clear what is Canonical tag and how to check on any website or page.
Now the next bit to consider is, how to add a canonical tag to the WordPress website.
How to Add Canonical tag to WordPress website?
Remember, only use the canonical tag if you want to differentiate the duplicate pages but if your goal is to permanent redirect then always use 301 redirects.
But if you want to add canonical tag then there are two ways one is complex and the other is very simple.
The complex process is placing the code manually to the theme header.php file , so will take every published post or page as canonical.
But for WordPress users, the process is very simple as most of the SEO plugins already place a canonical tag with your first published content.
But if you want to check or replace the existing canonical tag then below will be the steps with RankMath SEO plugin.
- Go to Post Editor in WordPress WP-admin.
- Scroll down and just below under Rank Math SEO click to Advance Option.
- There you can see an option for Canonical URL,either replace or validate.
If you are using Yoast SEO then there even you will get the same option under the Advanced section to set Canonical URL.
Anytime you want to change or edit or update the Connical Tag you simply come this advance option change it will apply to that particular URL.
Well i hope i answered almost all the queries related to what is canonical tag and why this is important and how to add canonical tag to website.
My View on Canonical Tag use
You won’t believe but yes many businesses are using the same quality content on different websites,but using the canonical tag to redirect SEO ranking to the original.
The canonical tag should be used, if you have duplicated pages on-site and to identify the same you can go with the Site Auditing tool of SemRush.
SemRush will offer you 7-Day free trial to analyze and give you an idea.
But before ending the note let me give you some important ideas about canonical tag.
Now It’s Your Turn.
If you like this content then why you are holding this with you only share it with your friends for better learning and must read 100+ SEO Glossary.
Thanks for reading this article. Your Suggestions Are Welcome. Write them down in the comment section or Contact Us. Based on the above findings, some recommendations includeStep-by-step prerequisites and requirements of the website and best web hosting services for small businesses.“Your appreciation warms our hearts! We’re genuinely thankful that you found our blog enjoyable. If you’re eager to see significant growth in your business, whether it’s through SEO, digital marketing, web development, or any other services, we’re your dedicated partners in success. It’s time to turn your aspirations into achievements. Take the first step today by contacting us. Let’s collaborate and take your business to new heights – the future of your success starts now!”