All things Shopify and commerce
Hello dear Shopify community,
I am Henry, the manager of the website wrapsify.com. Currently, I am facing an issue related to the collection pages of the website.
Specifically, the collection pages on the website are currently paginated as 1, 2, 3, 4, 5,... and are not properly canonicalized to the original URL. For example, the URL https://wrapsify.com/collections/motorcycle-gifts?page=2 is currently canonicalized to itself: https://wrapsify.com/collections/motorcycle-gifts?page=2.
However, I want all pages 1, 2, 3, 4, 5,... of this collection to be canonicalized to the original URL: https://wrapsify.com/collections/motorcycle-gifts.
I have tried some solutions but have not found an effective way to solve this issue. I sincerely hope to receive support from you in the Shopify community to help me overcome this problem.
Thank you very much,
Henry from wrapsify.com
Solved! Go to the solution
This is an accepted solution.
I did it successfully, thank you very much
Hi @wrapsify
Just update the theme liquid file
Find
<link rel="canonical" href="{{ canonical_url }}">
Replace with
<link rel="canonical" href="{{ canonical_url | split: '?' | first}}">
It will fix all the pagination issues with blogs as well.
Steps to find the theme.liquid
- Your Coffee Tip can create magic in coding ☕✨
- Seeking a Shopify Certified Developer? Contact us Shopify Verified partners
This is an accepted solution.
I did it successfully, thank you very much
If I managed to help you then, don't forget to Like it and Mark it as Solution!
Your Coffee Tip can create magic in coding
- Your Coffee Tip can create magic in coding ☕✨
- Seeking a Shopify Certified Developer? Contact us Shopify Verified partners
Will this also canonicalize the Collection and Blog tag pages as well?
This worked for us too, thanks. However, I found that this also caused our vendor URLs to lose the correct canonicalization. For example:
https://www.website.com/collections/vendors?q=brandx gets the canonical https://www.website.com/collections/vendors
maybe try this to only apply it to collection pages:
{% if template == 'collection' %}
{%- assign new_canonical_url = canonical_url | split: '?' | first -%}
{% else %}
{%- assign new_canonical_url = canonical_url -%}
{% endif %}
<link rel="canonical" href="{{ new_canonical_url }}">
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025