1. Configuration
  2. Canonical Tags Hierarchy
    1. Joomla Hierarchy
    2. Canonical Passed to Child
      1. Example
      2. Conclusion
  3. Adding Canonical Tags
    1. Joomla Articles
      1. How to set an article canonical tag
    2. Content Categories
      1. How to set a category canonical tag
    3. Tags
      1. How to set a canonical tag for a Joomla tag
    4. Menu Items
      1. How to set a menu item canonical tag

 

Configuration

 

There are six settings you can change in the plugin. They primarily change where canonical tags are allowed to be set.

Root URL: Enter the base URL for your Joomla installation e.g. https://www.danielmorell.com. This is used for setting the domain for relative URLs.

Remove Default Canonical Tags (Recommended): Set to Yes to remove the default canonical tags that Joomla places on articles. The core canonical tags are often wrong. This is recommended.

Article: Set to Yes to include canonical URL field in articles.

Category: Set to Yes to include canonical URL field in content categories.

Tag: Set to Yes to include canonical URL field in tags.

Menu Items: Set to Yes to include canonical URL field in menu items.

Note: If you set any of the canonical URL fields to No it will remove all canonical fields from that view/item type on the front end.

 

 

Canonical Tags Hierarchy

 

Joomla Hierarchy

In the Joomla CMS, there are two types of URL hierarchy: menu hierarchy and component hierarchy.

Menu hierarchy is created when you set parent and child menu items.

Component hierarchy is created when a component item is assigned child items. The most obvious example of this is the Joomla core content component's categories and articles. In the frontend, articles are displayed as child items of the category.

Canonical Passed to Child

In this plugin, you have the option of creating canonical tags on menu items. This was created for the purpose of serving canonical tags on static pages. The growth of drag and drop page builders like SP Page Builder, Quix, Gridbox, etc. is one of the main motivators for menu item canonicals.

If you set the custom canonical tag for a menu item that canonical link will be placed everywhere that menu item is displayed. This means that the setting the canonical for a Category Blog menu item view will cause the canonical to be placed not only on the blog page but also on the articles in that category!

Example

Let's pretend your Joomla website has the following menu items, content category, and articles.

Menu

  • Home - canonical URL: /home
  • About - canonical URL: /about
    • Team - No canonical URL
    • History - canonical URL: /about/history
  • Blog (Category: Blog) - canonical URL: /blog
  • Contact - canonical URL: /contact

Other than the Blog page all pages will be considered static and component childless.

Content

  • Blog (Category) - canonical URL: /blog
    • Our Summer Projects (Article) - canonical URL: /blog/our-summer-projects
    • Understanding Canonical Tags (Article) - canonical URL: /blog/understanding-canonical-tags
    • SEO for Joomla (Article) - No canonical URL

Given the above menu and content items, the following statements will be true.

  1. The Home canonical tag will be /home
  2. Team will not have a canonical tag served. Parent menu item canonical tags are not passed to child menu items.
  3. The History canonical tag will be /about/history
  4. The Blog canonical tag will be /blog
  5. The blog article Our Summer Projects canonical tag will be /blog/our-summer-projects
  6. The blog article SEO for Joomla canonical tag will be /blog

Why is the SEO for Joomla canonical tag wrong? The reason is that it is displayed under the Blog menu item. The category canonical tag is not used since the article view is being used not the category view. There is no article canonical tag so the plugin defaults to the menu item canonical tag.

Conclusion

Because, of this I recommend you never use the menu item canonical tag unless the menu item is for a static childless item. Unless, of course, you don't want any of the child items to be indexed. In that case please use the menu item canonical tag!

 

Adding Canonical Tags

 

Adding canonical tags to Joomla articles is easy with Custom Canonical. First, make sure you have installed and enabled the plugin.

Joomla Articles

You will need to set the Article setting in the plugin configuration to Yes.

How to set an article canonical tag

  1. Log into your Joomla back-end.
  2. Navigate to Content > Articles.
  3. Create or open the article you wish to place the canonical tag on.
  4. Click the Publishing tab.
  5. Enter the URL you wish to serve as the canonical link in the Canonical URL field.
  6. Click Save in the toolbar.

Your article canonical tag has been successfully created.

Content Categories

You will need to set the Category setting in the plugin configuration to Yes.

How to set a category canonical tag

  1. Log into your Joomla back-end.
  2. Navigate to Content > Categories.
  3. Create or open the category you wish to place the canonical tag on.
  4. Click the Publishing tab.
  5. Enter the URL you wish to serve as the canonical link in the Canonical URL field.
  6. Click Save in the toolbar.

Your category canonical tag has been successfully created.

Tags

You will need to set the Tag setting in the plugin configuration to Yes.

How to set a canonical tag for a Joomla tag

  1. Log into your Joomla back-end.
  2. Navigate to Components > Tags.
  3. Create or open the tag you wish to place the canonical tag on.
  4. Click the Publishing tab.
  5. Enter the URL you wish to serve as the canonical link in the Canonical URL field.
  6. Click Save in the toolbar.

Your tag canonical tag has been successfully created.

Warning: Before setting menu item canonical tags, read Canonical Tags Hierarchy. A failure to understand how canonical URLs are passed to child content can cause your site to be indexed incorrectly.

You will need to set the Menu Items setting in the plugin configuration to Yes.

How to set a menu item canonical tag

  1. Log into your Joomla back-end.
  2. Navigate to Menus > YOUR MENU NAME.
  3. Create or open the article you wish to place the canonical tag on.
  4. Click the Metadata tab.
  5. Enter the URL you wish to serve as the canonical link in the Canonical URL field.
  6. Click Save in the toolbar.

Your menu item canonical tag has been successfully created.

Note: if the menu item type does not serve content (e.g. Menu Heading and Menu Item Alias) the Metadata tab will not be available. You will see a new tab titled Canonical. However, entering any data into the Canonical URL field will do nothing since no content is served by this menu item type.

After you have saved your canonical tag verify that it is correct on the Joomla front-end by checking HTML <head> in the page source code.

 

 

Outil de création rapide, puissant et responsive.

En savoir plus

Extensions favorites

logo maximenuck 110 logo pagebuilderck 110 logo slideshowck 110template creator ck large 449

Sauvegarder
Choix utilisateur pour les Cookies
Nous utilisons des cookies afin de vous proposer les meilleurs services possibles. Si vous déclinez l'utilisation de ces cookies, le site web pourrait ne pas fonctionner correctement.
Tout accepter
Tout décliner
Analytics
Outils utilisés pour analyser les données de navigation et mesurer l'efficacité du site internet afin de comprendre son fonctionnement.
Google Analytics
Accepter
Décliner