Canonical tag in Magento is the best way to address content duplication issues and tell search engines about the main version of the page. 

Even though you don't publish the same content on different pages or create the same products multiple times, you still need to add canonical tags.

So, here you'll learn why do you need to add canonicals and how to do this.

Why Do You Need Canonical Tags in Magento 2?

As an eCommerce website, Magento uses faceted navigation and filtering to help customers find products that fit their needs. It results in parameterized URLs like:

https://yourwebsite.com/men/tops-men?p=2
https://yourwebsite.com/men/tops-men?climate=201&size=168
https://yourwebsite.com/men/tops-men?price=30-40

 

Besides, if you configure the category path to be displayed in the product URL, you'll eventually get multiple URLs that point to the same page:

https://yourwebsite.com/men/beaumont-summit-kit
https://yourwebsite.com/gear/beaumont-summit-kit
https://yourwebsite.com/sport/beaumont-summit-kit
https://yourwebsite.com/travel/beaumont-summit-kit

 

In both examples, your website visitors will see the page as one. So it makes no difference to them.

However, if you don't add canonical tags in Magento, search crawlers will consider all of these URLs as unique pages. 

As a result, search engines will choose what version of the page to index and rank which usually is not the right page. It goes against the Magento SEO best practices and doesn't help you improve the store ranking.

So, to boost your SEO potential and to make the "right" pages actually rank in search results, you need to add canonical tags.

How to Add Canonical Tags in Magento?

The rel="canonical" is the HTML attribute that is added within the <head> tag of the page. So, adding canonical tags usually requires editing the code. 

But not with Magento. 

Like other CMS, Magento allows you to add canonical tags for products and categories from the admin panel.

You just need to go to Stores > Configuration > Catalog > Catalog > Search Engine Optimization and enable the corresponding options for products and categories.

Magento Canonial Meta Tags

Once you enable these options, canonical tags will be added to your product and category pages. 

Canonical Tags in Magento 2

However, products and categories are not the only pages on your website.

What about contact, blog, CMS pages, and the homepage?

Unfortunately, default Magento doesn't cover this. So, if you want to add canonical tags to other pages as well you can rely on Magento 2 SEO Suite Ultimate Extension.

It also allows you to add canonical tags with a few options. But these options are more extended and cover all of your website pages.

To add canonical tags in Magento 2 with this module you just need to go to Stores > Configuration > Magefan Extensions > SEO and enable canonicals for any page on your store. 

Add Canonical Tags in Magento 2

Could it be any simpler?

Magento 2 canonical tags are just a small piece of the SEO puzzle. To put the whole of it together you need to cater to other SEO-related features of your store.

However, taking small steps is the best way to go. Check out the SEO Suite Ultimate extension live demo to find out what to optimize next.