skip to Main Content

How to I add a noindex tag to pagination pages for categories in Shopify?
I’ve found apps that claim to do it, but I believe it should be able I can do without an app.

Thanks

2

Answers


  1. You need to know which template to target, usually templates that have pagination in Shopify are: collection, blog, search.

    So you should be able to do something like this in theme.liquid:

    {% if template.name == "collection" or
      template.name == "blog"
    %}
      <meta name="robots" content="noindex, nofollow" />
    {% endif %}
    
    

    This ^ is very generic so if you want to be more specific, you can check for the page object (collection, product, page, blog, article, etc…) handle:

    {% if collection.handle == "example" or
      page.handle == "example" or
      blog.handle == "example"
    %}
      <meta name="robots" content="noindex, nofollow" />
    {% endif %}
    
    Login or Signup to reply.
  2. It would be better to let Google crawl pagination URLs, using a self referencing canonical for each. As soon as you add nofollow you block the bots. That can cause problems.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search