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.

 Can’t wait to get down to business? Do all the basic settings with our Magento 2 SEO extension.

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 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 does Googlebot choose the canonical URL?

Googlebot uses multiple tools to choose the canonical URLs. It analyzes the main content and compares them for info duplication. Between two very similar pages, it will choose the most full and useful for users.

Besides content, Google checks security protocols of the page (https), sitemaps, and “rel=canonical” labels.

The page that was chosen as canonical by Google will be more often crawled and will have a better position on SERP. Google search results usually contain canonical URLs. The only exception is when the duplicate suits better, for example, Google will choose https://m.example.com/news/ page for mobile users even if the canonical URL is https://example.com/news/. Moreover, although you can indicate the needed page as canonical, Google still may choose another one.

If your Magento 2 website has multiple languages, pages with the same content in different languages will not be considered as duplicates. But the page has to be fully translated, including header, footer, body, and other text.

How to learn what URL is canonical?

Google has the URL Inspection tool that can provide you with information about your URL. Here are a few notes that you should know about this test:

  1. You have to own the URL that you want to test. Please make sure that you are using the right account.
  2. If the testing page has duplicates, you will see the info about the canonical URL in the report, but only in case it also belongs to you.
  3. It is possible to test both AMP and non-AMP URLs.

For more information about this tool, please visit the official page.

Sometimes it happens that canonical URL is in a property that you don’t own. Here are some reasons why this issue can appear:

  • Mistakes in site content localization. In this case, you need to check the official localization guidelines.
  • Incorrect canonical tags. Click here to learn how to set up a canonical URL in Magento 2.
  • Incorrect server settings. Contact your hosting to solve this problem.
  • Hacker attack. Sometimes malefactors use 301 redirect or cross-domain rel=”canonical” link into the HTML <head> to mark malicious URL as canonical.
  • External websites copy your content. If you are sure that a third-party website hosting your content, please leave the request to Google.

Additional methods on how to specify a canonical page

In addition to the methods described above, there are several other options for how to mark a link as canonical:

  • rel=canonical <link> tag – Add this tag with the canonical link in the code for duplicate pages.
  • rel=canonical HTTP header – Send a rel=canonical header in your page response.
  • Sitemap – Define canonical URLs in a sitemap.
  • 301 redirect – Set us 301 redirect to indicate the canonical page for Googlebot if the duplicate page is out to date.

How to set canonical URLs in Magento 1?

Product Canonical Links

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.