The plugin
If you are reading this article, you already know that Canonical URLs have an important part to play in SEO, because they prevent our website from running into the penalties that search engines give for “alleged duplicate content.”
In Joomla! they can be easily managed with the help of our plugin.
This supports their management on all Joomla elements, Convert Forms and SP Page Builder, allows a full control over them and can be run in both automatic and manual mode.
In automatic mode (enabled by default), it automatically creates the correct canonical URLs by analysing and inspecting the hierarchical structure of content URLs.
In manual mode, the responsibility for such checks lies with the user who enters the custom canonical URL.
In the latter context, in order to avoid harmful errors in content indexing, it is important to remember how URL hierarchies work in Joomla!
URL hierarchies in Joomla!
There are two types of URL hierarchy in Joomla: the menu hierarchy and the component hierarchy..
The menu hierarchy refers to the arrangement of menu items and sub-items.
The component hierarchy is when the elements handled by a component are grouped by type.
When we create an article and assign it to a category, the "com_content" component creates a hierarchical parent-child relationship, where the category is the parent and the article is the child.
Our plugin allows you to place custom canonical URLs on menu items as well.
This option could be useful for third-party Joomla! extensions, but we must be very careful, because a wrongly set canonical URL on a menu item can also be shown where it is not desired.
Let's take an example
Let's take an example to make this concept clearer.
Suppose you have a website that has the following menu entries, content and custom canonical URLs.
MENU
- Home →
https://mysite.com/ - Services →
https://mysite.com/services- E-learning →
https://mysyte.com/elearning - Software Development → no canonical
- E-learning →
- Blog →
https://mysite.com/blog - Get a quote →
https://mysite.com/get-a-quote
All entries refer to static content with no parent-child hierarchical relation, apart from Blog, which, as we shall see, refers to a category of articles.
CONTENTS
- Blog (Category) →
https://mysite.com/blog
- Best Dart server (Article) →
https://mysite.com/blog/best-dart-server - Cassiopeia how to (Article) →
https://mysite.com/blog/cassiopeia-how-to - BSD for dummies (Article) → no canonical
- Best Dart server (Article) →
In this situation, canonicals will be:
https://mysite.com/for Homehttps://mysite.com/servicesfor Serviceshttps://mysyte.com/elearningfor E-learning- Software Development will not have a canonical, because it has its own menu item that lacks it and cannot inherit it from Services as static content without a parent-child hierarchical relationship.
https://mysite.com/get-a-quotefor Get a quotehttps://mysite.com/blogfor Bloghttps://mysite.com/blog/best-dart-serverfor Best Dart serverhttps://mysite.com/blog/cassiopeia-how-tofor Cassiopeia how tohttps://mysite.com/blogfor the article BSD for dummies
Why is the canonical URL of Blog used for the BSD for dummies article?
The reason is that the article does not have one set up of its own, nor does have a menu item directly linked to it.
In this case, when viewing the article, the active menu item is still Blog and its canonical is used.
Conclusions
To avoid these unwanted results, we at HTML Crusco recommends against setting custom canonical URLs on menu items, unless they are static content without a parent-child hierarchical relation.
In all other cases, as the plugin itself reminds us (see image below), it is recommended to handle these URLs in the plugin's own area within the Joomla components.
This plugin Crusco Canonical URL supports all Joomla elements, Convert Forms and SP Page Builder
To learn more read the "How-to" section on the plugin page.