Have you found duplicate content on your site? No worries, it’s all right.

There are weighty reasons why your website includes several URLs that lead to the same page or duplicate content on different URLs. Moreover, this is a usual practice for online stores in general to have content like that; which is normal because of the typical e-commerce functionality.

And though the case is not unheard of and your rankings won’t be hurt for it, you need to eliminate the problem and following are a few reasons why.

Why work out the duplicate content issue?

  • To point out a URL that you want users to see in search results;
  • To help search engines assign all the duplicate URLs (from your and other websites) to a canonical one;
  • To make product metrics easier by allotting the duplicate product pages to a definite piece of content;
  • To manage the syndicated content posted on other resources and assign ranking to a preferred URL;
  • To exclude the duplicate pages from crawling and let Google spend time on crawling new pages to gain the maximum out of your site.

So, how to solve the duplicate issue for good? The easiest and most powerful way is to set canonical URLs.

What is a Magento canonical URL?

A canonical URL is an address that is chosen as a ‘preferred’ one for search engine indexation. You may also hear users say ‘canonical tag’ keeping in mind an HTML attribute, which you apply to website pages to tell search engines where to assign the search value.

The canonicalization is necessary for pages with duplicate or very similar content. Thus, you can indicate which page is the main.

E.g.: Let’s say that you have these pages for the same product:


If you won’t make any settings on your Magento store, search engines will automatically choose one of them as canonical considering it the most relevant. This means you won’t be able to control the choice, until making any changes.

Therefore, you need to tell search engines which one is canonical and set the 301 redirect for all the rest.

Learn everything about duplicate content from our extensive guide on Magento duplicate content.


How to set canonical URLs in Magento 1?

Product Canonical Tags

Have you chosen the URL to rank? Great!

  • Now log in to the Admin Panel and navigate to System>Configuration menu:


  • Choose Catalog tab from the left menu and expand the Search Engine Optimizations drop-down menu:


  • Make sure the Use Canonical Link Meta Tag For Products field is set to ‘Yes’:


! Don’t change the fields to ‘No’ in case they were previously set to ‘Yes’. This can bring to SEO achievements destruction, as Google won’t see the URL you want to rank but multiple pages with duplicate content.

  • Save the changes if you’ve applied any and clear the cache.

Category Canonical Tags

Why haven’t we made the setting at the Search Engine Optimization tab in the Use Canonical Link Meta Tag For Categories field?

Simply because you won’t manage to control the situation manually. Therefore, the above-mentioned field should be set to ‘No’, so that you can add the canonical tag manually:

  • If logged in, go to System>Configuration>Catalog>Search Engine Optimizations, find the drop-down Use Canonical Link Meta Tag For Categories field and set it to ‘No’. Don’t forget to save the changes:


  • Choose a needed category page, for this go to Catalog>Manage Categories:


  • Choose the Custom Design tab from the upper menu:


  • In the Custom Layout Update box, fill in the next code:
<reference name=”head”>
<action method=”addLinkRel”>
  • Save the changes and check the source code of the category page. It should be the following:
<link rel=”canonical” href=”example.com/category-women.html” />

How to set canonical URLs in Magento 2?

  • Log in to the Admin Panel, go to Stores>Settings>Configuration:


  • Expand the Catalog drop-down menu and choose Catalog. Then open the Search Engine Optimization section:


  • Make the next changes:

If you need Google (or any other search engine) to index the pages with complete category URL path only, make the changes:
Use Canonical Link Meta Tag for Categories – ‘Yes’;
Use Canonical Link Meta Tag for Products – ‘No’;

If you want Google (or any other search engine) to index the products pages only, complete the next settings:
Use Canonical Link Meta Tag for Categories – ‘No’;
Use Canonical Link Meta Tag for Products – ‘Yes’;

If you want Google (or any other search engine) to index categories and products, enable both the options:
Use Canonical Link Meta Tag for Categories – ‘Yes’;
Use Canonical Link Meta Tag for Products – ‘Yes’;

Don’t forget to save the changes and clear the cache in the end.

Useful add-ons

For working with duplicate content and canonicalization you need to have a real understanding of SEO. Otherwise, you may lose the rating positions you’ve already achieved.

If you want to make the work clearer, less time-consuming and more efficient, you may try our ready-made solutions for Magento 2.

With Magento 2 AJAX Layered Navigation, for instance, you get special possibilities, such as:

  • flexible canonical modes;
  • handy detached Canonical URL grid;
  • and the ability to set structure of canonical URLs for ‘key’-related and category pages:


In addition to the AJAX Layered Navigation, Magento solutions such as SEO Toolkit for Magento 2 offer a complete list of SEO hits you may apply to boost your platform basic settings. Using the toolkit, you can act in numerous optimization ways at the same time:

  • Unique product URLs;
  • XML Sitemap;
  • HTML Sitemap;
  • Pager Optimization;
  • Google Rich Snippets;
  • Relevant Meta Tags;
  • No duplicate content;
  • Cross Linking.

The same tools are available for Magento 1 as well.

Download PDF version of the article (1,5 Mb)