Pagination parameter has a self referencing canonical

Highlighted
New Member
1 0 0

My pagination parameters are still indexed by Google and I want them to either canonicalise to the non-parameter URL or to be no indexed.

 

 

I have the following theme code;

 

  <link rel="canonical" href="{{ canonical_url | remove:"?page=" }}" />

 

but it only strips out the '?page=' and leave the number at the end of the URL. For example;

 

URL: /collections/girls?page=2

Canonical: /collections/girls2

 

What do I need to add to ensure it also gets rid of page numbers? or do I need to be adding something completely different?

 

Thanks in advance!

0 Likes
Shopify Staff
Shopify Staff
560 36 80

Hi, LIZ.

 

Dallas here from the Shopify Social Care Team.

 

When it comes to urls the extra bits are unfortunately unable to change. All URLs generated by Shopify are not customizable, except for the handles. So you could change the product name, or in this case, the collection name, but everything else will stay the same.

 

24-16-wpmwk-hi8fs

 

To adjust that you would just scroll down to the SEO section of your collections page in your store admin. You are able to adjust what the URL bar says there, but that wouldn't affect the page numbers.

 

The reason that you are seeing ?page=2 is because you went to page 2. Basically, a URL is like breadcrumb navigation. Whatever the path was that led you to the page that you are on will be documented in the URL bar at the top of the page. Although /girls2 is a preference for your store URL, it wouldn't properly coincide with your store's backend.

 

Now I can't guarantee that a Shopify Expert would be able to re-write the backend of your site, but they would be a great place to give you a solid answer. They have extensive knowledge of Shopify Backends and do lots of customizations, so they are very knowledgable.

 

I completely understand how frustrating this must be for you so I have taken the liberty to send a message about this to our Merchant Frustrations team. I can't promise that they will reach out to you when, or if, an adjustment has been made. All the same, I've added your concerns for them to look into.

 

I hope that helped to clarify, I wish I could be of more assistance. If you would like any more help with anything else please let me know and I will be happy to assist you. If you would like to talk with one of our live care gurus they are here 24/7 to answer any questions that you may have!

 

Best,
Dallas

Dallas | Social Care @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes