Skip to content

Guides / Technical SEO

How to Edit robots.txt on Shopify (Without Hurting Your SEO)

Editorial Team · 26 Nov 2026

Shopify creates a sensible robots.txt for every store. Most stores never need to touch it. But if your catalogue uses lots of filters, tags or internal search pages, Google can waste time crawling thousands of near-duplicate URLs.

What Shopify blocks by default

The default file already disallows checkout, cart, account and admin paths, plus sorted and filtered collection URLs such as /collections/*sort_by*. That covers the biggest sources of crawl waste.

When customising makes sense

  • You have tag pages (/collections/shirts/blue) that duplicate filtered views.
  • You use an app that creates search or filter URLs with parameters Shopify doesn't block.
  • You want to block a specific AI crawler or bot.

How to edit it

  1. In Shopify admin go to Online Store → Themes → … → Edit code.
  2. Under Templates choose Add a new template → robots.txt. This creates robots.txt.liquid.
  3. Keep Shopify's default rules (the template includes them) and add yours inside the loop for the * user-agent.
{%- if group.user_agent.value == '*' -%}
  {{ 'Disallow: /collections/*+*' }}
{%- endif -%}

Rules to avoid

  • Never Disallow: / (it hides your whole store).
  • Don't block /products/ or /collections/ themselves.
  • Don't block CSS or JS files: Google needs them to render your pages.

Check your work

Open yourstore.com/robots.txt, then test a few important URLs in Search Console's URL Inspection tool. Our free Robots.txt Generator has a Shopify preset you can start from.

Want this done for you?

Our specialists handle SEO, email, design and ads for online stores at fixed prices.

Explore services

Keep reading