How to resolve pagination and SEO issues causing duplicate content?

Fonviggroup
New Member
4 0 0

Hello Shopifyer's,

 

I've a Shopify shop in which we've had pagination on our "collection" pages, however this created a small SEO issue with duplicate content, so we decided to remove pagination and have all products showed on 1 page.

 

However, even tho we've made this change, the old pages like " /collections/stue?page=1 " and " /collections/stue?page=2 " etc. is still on the websites and indexed by Google, which makes a duplicate content issue, as the text is duplicated on all the pages.

 

Thanks in advance!

 

What to do here?

Steffen Fonvig | CEO at Fonvig Group
Replies 13 (13)

FatFishMarketin
Shopify Partner
6 0 3

Hi There,

 

The best fix for this while being the easiest way to do this without having to become a coding genius is the following...

 

Go to your theme.liquid file and find

 

<link rel="canonical" href="{{ canonical_url }}" />

 

Change to....

 

{% if template contains 'collection' %}
<link rel="canonical" href="{{ shop.url }}{{ collection.url }}" />
{% else %}
<link rel="canonical" href="{{ canonical_url }}" />
{% endif %}

 

Best

Fat Fish Marketing

Joshua Neilly
Fat Fish Marketing
Fonviggroup
New Member
4 0 0

What excatly will this do? I'm familiar with canonical tag, however i need to know and understand what excatly this code will do with my collectionspages and their paginationpages.

Steffen Fonvig | CEO at Fonvig Group
FatFishMarketin
Shopify Partner
6 0 3

It sounds to me that you are using the standard shopify canonicalization. (The practice of stating to google that 2+ pages are just different versions of 1 and that is that 1).

 

In shopify default however it does not canonicalize by default the ?Page.  So you get your problem.

 

So this code says ...

 

| IF the template of the page being used is that of a collection, canonicalize that page to the "Shop/Collection" no matter what. 

 

Otherwise stick to standard. |

 

Best 

Fat Fish Marketing - Joshua

Joshua Neilly
Fat Fish Marketing
skicrave
Shopify Partner
2 0 0

We started noticing issues in Google's index related to this a few months after our migration to Shopify. Kind of shocked that in 2022 Shopify doesn't handle pagination correctly from a canonical URL standpoint. Is this really something merchants have to be on the lookout for?

plakatkunstdk
Visitor
1 0 0

Looking at this solution, but my code looks like this:

 

{%- comment -%}Auto-disabled. Yoast plugin is taking care of Meta Tags output.{%- endcomment -%}
{%- if disabled_by_yoast_seo -%}
<link rel="canonical" href="{{ canonical_url }}">
{%- comment -%} End Yoast auto-disable. {%- endcomment -%}
{%- endif -%}

 

Even the line in question doesn't have the closing /

 

Does this matter, what should I do?

Thanks!!

FatFishMarketin
Shopify Partner
6 0 3

Hi There,

 

It looks like you have installed the Yoast SEO Plugin. I have not had the need for it before and like to save the $240 a year. However, If you share me the URL to your store I would love to see if you still have this issue. If that is the case, I would just remove and replace that code. As Yoast is not doing the task and it will only impact the canonical. However, I imagine if they have done this, they have their own canonical version somewhere.

 

Best

Joshua

Fat Fish Marketing

Joshua Neilly
Fat Fish Marketing
Andakarso
Visitor
1 0 1

Bro, you are the best!!! Thanks

FatFishMarketin
Shopify Partner
6 0 3

Glad I could help

 

Joshua

Fat Fish Marketing

Joshua Neilly
Fat Fish Marketing
sara_alexeve
Tourist
13 0 1

I made this code change and it had no affect at all. Not sure why??

FatFishMarketin
Shopify Partner
6 0 3

Whats your store URL? I will have a look

 

Joshua

Fat Fish Marketing

Joshua Neilly
Fat Fish Marketing
Guðmundur_Ingi_
Visitor
3 0 4

This worked great!

taniaser
Shopify Partner
1 0 0

Hi there, this solution works well for me on the collections page.
Could you suggest how I can do the same for blogs?

hammadf
Visitor
1 0 0

Legend Sir! it worked. Now just have to see how this will impact on SEO.