Home » How to Solve Shopify Duplicate Content In Collection & Product Pages?

How to Solve Shopify Duplicate Content In Collection & Product Pages?

SEO experts globally have a complicated relationship with the Shopify e-commerce platform because of there duplicate content issues on products pages. It comes pre-equipped with tons of functionalities and SEO capabilities. That’s not all, Shopify also includes out of the box metadata fields, automated XML sitemaps, and a user-friendly website analytics tool. At first glance, Shopify looks great but there are some aspects of the platform that can frustrate you beyond control. First and foremost, Shopify doesn’t let users make changes to their robot.txt files which is essential for managing SEO crawlability. The limited flexibility is just one of the many reasons why most SEO Experts dislike Shopify. However, there are some fixes to their limited flexibility problems. In this guide, we will teach you how to solve “Shopify duplicate content” issues. 

Solving Shopify Duplicate Content Problem

Before we jump to the solution, let’s understand what is the problem and what’s causing it. You should have a keen knowledge of shopify canonical tags and duplicate content first. Below we have mentioned Google’s official statement on Canonical tags. 

“A canonical URL is the URL of the page that Google thinks is most representative from a set of duplicate pages on your site. For example, if you have URLs for the same page (for example example.com?dress=1234 and example.com/dresses/1234), Google chooses one as canonical.”

Basically, Google wants to determine the most important or the primary version of your page. Google does this itself or you can guide it in the right direction by providing canonical tags. You have to meet certain requirements for Google to accept canonical tags. Google has obviously a lot of guidelines but one point, in particular, stands out.

“Link to the canonical URL rather than a duplicate URL, when linking within your site. Linking consistently to the URL that you consider to be canonical helps Google understand your preference.”

Google tries its best to understand the relationship between duplicate URLs on your website. If you send the links to the non-canonical version, it could result in the wrong URL ending up in Google’s index. Which in turn could have a catastrophic impact on your SEO rankings. 

Shopify Dynamic Collection Product URLs

Shopify has two different page structures to showcase the product range. The first one is the traditional one and the second structure is much bigger and seems confusing. In the second example of the page design, you can access any collection via this path /collections/fall-winter-2021/page, which is why dynamic URLs are created.

Both of the URLs open absolutely identical pages but in some cases the /product/collection/product URL ranks despite it being canonized. This canonical and non-canonical page differentiation is a well-known frustration among SEOs who use Shopify. Chances are you have already come across the issue yourself. 

Configuring Collections and Products URLs

As soon as you start working, Shopify creates the product URLs so they would be updated dynamically to include the name of the collection the user is working on. Basically:

  • Product A – Domain.com/products/product-a Product A in Featured Collection – 
  • Domain.com/featured-collection/products/product-a Product A in Sales Collection – 
  • Domain.com/sales-collection/products/product-a

All of the above are basically the same product and same page. While Shopify’s canonical tag properly points search engines to the main version of the URL but internal links sometimes still take users to the non-canonical versions that are available all over the website. You can eliminate the line of code that causes this specific issue that dynamically generates the collection URLs.

To get yourself out of this problem, you’ll have to take access to the Shopify theme’s liquid files. The process may be a bit different based on the theme you are using. But if you need a place to start then start looking for this particular line of code:

{{ product.url | within: collection }}

Look for your “collection-template.liquid” file. This is the file that needs to be edited, once you find the file, do a search using the search command and type in the code below. 

We want to override the code so all the products URL shows up in internal links across the website, regardless of the collection it is found in. Keep in mind that the URL is designated as canonical, so that version should be the one that’s linked all throughout the website. All you have to do now is to replace the code with:

{{ product.url }}

Once you remove the “within.collection” from the code, you can get rid of the dynamic version of the URL structures. If the process worked perfectly, all the canonical links in your website URL will be visible from any collections page. This simply means that you “fixed your Shopify duplicate content issue“.

Things To Remember While Configuring Collection Pages

1. This process will not erase your collection URL. It still will be a live page with a canonical tag pointing towards the product page. Use this process to make sure the collection URL isn’t the version that is being liked internally.

2. Do not mark the URL as noindex. Both noindex and canonical tags make conflict for Google. 

3. Make sure that any and all internal links from the non-collection page lead towards the product version of the page. 

4. No collection version should be included in the XML sitemap.

Conclusion: No More Shopify Duplicate Content

Managing the canonical and non-canonical tags is a regular task for SEOs, the process is small and painless. However, dealing with structural CMS functionality can make things tough and tricky. Shopify has a lot of inflexibility but with the right information and tools, you can find the solution to almost every possible trouble.

Back to top