Shopify Still Generating Paginated URLs in Header Despite Pagination Being Removed from Frontend

Hi Shopify Experts,

Currently facing an SEO concern related to paginated collection URLs.

I’ve removed the pagination functionality from the front end, so users can no longer paginate through products. However, Shopify still automatically generates paginated URLs (?page=N) in the backend, including in:

  • {{ content_for_header }}
  • rel=“next” and rel=“prev” tags
  • Canonical tags pointing to paginated URLs like ?page=1, ?page=2, etc.

This is creating a duplicate content issue in search engines, especially because:

?page=1 is treated as a separate URL from the base collection page

Canonical tags often self-reference the ?page=N version instead of the clean base URL

I’ve tried filtering URLs in pagination.liquid and also overriding content_for_header like this:

  • {% capture custom_header %} {{ content_for_header | remove: ‘?page=1’ | remove: ‘?page=2’ | remove: ’
  • page=3’ | remove: ‘?page=4’ | remove: ‘?page=5’ }} {% endcapture %} {{ custom_header }}

But this is not scalable, especially for large stores with 20–50+ pages.

My Questions:

  1. How can I prevent Shopify from generating paginated URLs in the content_for_header and canonical tags when pagination is disabled on the frontend?
  2. Is there an official or supported way to dynamically clean or override these paginated meta tags?
  3. Can I fully remove ?page=1, ?page=2, etc., from being output at all (not just hidden visually)?

This duplication is impacting our SEO and crawl budget. I’d appreciate your guidance or a best-practice solution.

Thank you!
Store URL (powerhouseexpress.com.pk)

You’ve actually broken your collection pages.

If you scroll past first portion of products, your theme will load another copy and then another and another.

Every infinite pagination is based on the page-based pagination.

Hi, Tim

I would appreciate your guidance on the best way to implement infinite scroll functionality on our collection pages without causing repeated loading of the same content or negatively impacting SEO. Our goal is to maintain an optimized user experience while ensuring proper content indexing and avoiding duplication issues.

Thank you for your time and support.

Warm regards,

Additionally, when checking via site:yourstore.com/collections, paginated URLs (like ?page=2, ?page=3, etc.) are also indexed by Google, which may lead to duplicate content and SEO issues.

Could you please advise the best way to implement infinite scroll that avoids content duplication and ensures SEO-friendly behavior?

It’s definitely possible to implement infinite scroll in such a way that it does not expose next/prev links directly.

While this is not a very complex modification, it would still require some significant code edits.

Ajaxinate (which is used at your site) actually uses pagination – it looks for the “next” link (and stops if there is no one) and if it’s there, it loads html from that link and adds product grid contents to existing one. Since you’ve modified your pagination, there is always “next” link (so it would not stop) and it always loads the same first page content, because it points to the first page.

It is done this way to be a easy to implement in most shops with pagination.

One can replace these links with non-clickable elements which will provide links in attributes other than href and amend Ajaxinate settings to use these elements and attributes.

However, keep in mind that the actual URLs will still be accepted and used by visitors browsers even if your site will has no direct links – there is simply no other way to fetch those products into collection grid.

Then, since Google bot does not scroll, it will never see products in collection further than first batch, so there will actually be no links from collections to your products. Yes, Google will learn about your products from sitemap.xml, but lack of actual links may negatively impact SEO.

Quick Google search reveals that pagination is usually seen as a better option both in terms of UX and SEO (or easier to implement properly).

https://support.google.com/webmasters/thread/322630903/need-opinion-infinite-scroll-vs-pagination-for-ecommerce-website?hl=en

https://support.google.com/webmasters/thread/173925290/infinite-scrolling-crawling?hl=en

https://support.google.com/webmasters/thread/173925290/infinite-scrolling-crawling?hl=en