How To Add Canonical Tag In Joomla In 3 Minutes
One day you go into the search console and find URL paths like below getting indexed and being clicked at instead of your main URL
Do they seem familiar to you? I bet it is because, in Joomla, the system has its way to generate those dynamic, unfriendly URL automatically.
In the eye of the visitor, they can’t tell any difference between those URL, however, google bot see them as different to each other. And it can be counted as duplicate content which will harm your search ranking severely.
Therefore, to avoid this critical issue, a popular method that every webmaster needs to know is using a canonical tag.
This article will show you how to insert a canonical tag in Joomla in 3 minutes.
Table of content:
- What is canonical tag?
- How to add a canonical tag in Joomla
- What do you need in a Joomla canonical extension and plugin?
- Best practice
- When to use a 301 Redirect instead of canonical tag
What is canonical tag?
If this is the first time you have ever heard of this term. Take a close look at this section. If not you’re welcome to skip.
So, canonical tag (or rel=canonical) is a method to tell Google or any search engine which URL/ page is a real one and should be indexed instead of all other duplicate ones.
Let’s take this example:
A: https://www.domain.com/article - You want to index this one
E: https://www.domain.com/index.php?option=com_content&view=category&layout=blog&id=9&itemid=1 - Joomla dynamic URL.
As you can see, URL A is the real one and should be indexed, but there are also B, C, D, and E with everything the same except its URL. The problem is those URLs functions normally but Google can’t tell the difference between them.
If you don’t have any method to distinguish, all of them will get indexed. As a result, page A will be less infective on the search ranking page (less impression, less click).
However, by inserting this code in B, C, D and E pages, you can avoid the duplicate issue.
<link href="https://www.domain.com/article" rel="canonical"/>
It’s simple as that, and the upcoming section, I will show you the easiest way
How to add a canonical tag in Joomla
The most popular way is using Joomla canonical plugin or extension. And for all of those plugins, I think the most easy-to-use, and suitable for Joomla CMS is Custom Canonical Pugin by Daniel Morrell. Since it is also free to download, so anyone can access this extension
Step 1: Download and install the extension on your Joomla site
Step 2: Navigate the plugin in your site with the name: Custom Canonical.
Step 3: Set up, and enable the plugin.
Step 4: Now, you can add a canonical tag to your article, category, and menu through a special field in Publishing or MetaData tab.
Step 5: Check the canonical tag on your Joomla Pages
Using the auto-generated Joomla link to test your work. A canonical tag is only effective when inserting to duplicate pages. Self-inserted is doing no harm but also doesn’t have any benefit.
It should have the format of: <link href="https://www.domain.com/article" rel="canonical"/> in <head> section like the picture below:
What do you need in a Joomla canonical extension and plugin?
Beside custom canonical, there are other free and premium extensions. However, after spending time to check, some of them can not seem to do the job, or partially solve the problem. Therefore, there are a few things you need to take note of before choosing other extensions:
1. Be able to insert a canonical tag in article, menu, and category.
Since Joomla has 3 different ways to generate alias: in article, menu, and category. So your canonical extension must be able to insert in all components.
2. Can automatically put canonical tag in Joomla dynamic URLs
For example: /option=com_content&view=category&layout=blog&id=9&itemid=1/
A free edition of Route 66 an Aimy Canonical extension can put a canonical tag in all components but it also removes query string in URL so it can not be applied to this type of self-generated Joomla URL.
3. Override any canonical tag has existed before
For example, template by Helix framework already has a canonical tag, in some situations it’s not correct or you need to insert the tag to other extension built pages like K2 or Virtuemart. Make sure your plugin or extension can override those to avoid any further problem
Note: Canonical Links All in One is a really good premium extension for inserting a canonical tag. Besides basic functions, it also has advanced features like the insert to tag view, pagination series, support K2, Virtuemart and Easy Blog, etc.
4. Freely customize canonical tag
The ability to customize your canonical tag is always great when you will have full control of your site. More importantly, there will be many occasions when you have to manually insert a canonical tag. It will be explained in the below section.
Best practice for inserting a canonical tag
Insert a canonical tag is recommended, but you also need to know in which situation to implement this technique
1. When you have extremely similar content or extremely duplicate
This case is non-discussion. For whatever reason you have that kind of page, if you still have a purpose in your site, it’s best to insert a canonical tag into it for Google to know what to rank for.
In Joomla, this often occurs to a category or menu view.
2. When the search intent is similar
It’s normal to have many articles targeting the same keyword with different kinds of content. However, it will confuse Google to rank a specific page for a keyword, so it’s best to choose only one page to rank for. Other pages can still simultaneously exits with a means for your content marketing or any purpose.
3. When you republishing a page
You have an old page that outdated, you decide to republish those with different URL but still want to keep old URL for reference. In this case, put a canonical link in an old page to tell Google that we are having a new page and you should index this one.
4. Use absolute URLs instead of relative URL
This is an absolute URL: <a href =“https://domain.com/abc”>
This is relative URL: <a href = “/abc”>
Google or any search engine will ignore your canonical tag if you use relative URL, so avoid them at all cost.
When to use 301 Redirect instead of canonical tag
301 Redirect is the method to redirect a link A to link B whenever a user clicks on link A
The common between the 2 methods is that they can solve the duplicate content problem. But they are different in the way they use.
It’s best to use a 301 redirect instead of the canonical tag when:
- You delete a page, is result in 404. Redirect it to a new page
- You want to transfer all link equity or page rank to a new article.
- When users access your site through multiple URLs.
For example: https:/www.domain.com, http://domain.com, http://domain.com/index.php, etc. It’s best to pick 1 URL and redirects them all to the one. You can learn how to redirect a link in Joomla with this guide.
Read more: 9 Do and Don’t when solving duplicate content.
Canonical tag is a great method to tell the search engines which page you want to rank among all your duplicated or less important content. To insert one in your Joomla, its best to use Joomla canonical plugins or extension like Custom Canonical Tag
I hope you can successfully implement it.
Learn more about SEO: