Content duplication is one of many SEO issues, Magento SEO is not an exception. It is one of the main factors that could prevent your pages from being ranked properly. Nevertheless, there is an efficient solution — canonical tags.
Canonicals are used to indicate the main version of the page if you have some pages with similar/identical content and different URLs leading to them.
Thus, it's extremely important to add canonical tags to your store pages, content pages in particular. Why? You'll find out soon.
Post Contents [hide]
How Do Canonical Tags Work in Magento 2?
Magento provides canonical tags functionality out of the box. And you don't even have to edit code. All you need is to navigate to Stores > Configuration > Catalog > Catalog > Search Engine Optimization and enable canonicals right in the admin panel.
But there is a catch, as you might have noticed. By default, you can only add canonical tags to categories and products. That's a great opportunity as it is, but unfortunately, not always sufficient. Thus you'll need to use some extra tools not to leave content pages out.
How to Add Canonical to Content Pages?
The main content pages of your store are the homepage and CMS pages. Of course, if you're running a blog, then you also have a massive amount of your content there. Thus, it's essential to make sure that robots crawl and rank these pages too.
As we've mentioned above, Magento doesn't offer this functionality by default. However, the Magento 2 SEO extension does. It allows you to add canonical tags to the content pages in a matter of seconds.
To add canonical tags to Magento content pages:
1. Navigate to Stores > Configuration > Magefan Extensions > SEO and find the Canonical Tag section.
2. Choose Yes for the pages you want to add canonical tags to.
3. Press the Save button and check the results using browser dev tools.
That's how you add canonical tags to content pages in Magento 2! No overwhelming code editing here, just pressing a few buttons. But that's not it.
You can also add custom canonical tags to your Magento 2 pages. This gives you more flexibility to fit the canonical tags into your SEO strategy for custom pages.