Robots.txt for Shopify: How to Edit It Correctly

Shopify used to be one of the few major platforms where robots.txt simply wasn't editable — the file was generated automatically, and store owners just had to accept whatever rules Shopify shipped with. A lot of outdated advice online still assumes that's true.

It hasn't been true since mid-2021. Every Shopify store can now override its default robots.txt through a template file called robots.txt.liquid. The catch is that editing it wrong — deleting the wrong line, blocking the wrong folder — can quietly choke off crawling to pages you actually want indexed. This guide walks through doing it safely.

Quick Answer

You edit robots.txt on Shopify through Online Store → Themes → Edit Code → Templates → robots.txt.liquid. Add your own Disallow or Allow rules alongside Shopify's default groups rather than deleting them, save, then check the live file at yourstore.com/robots.txt and confirm it in Search Console's robots.txt Tester before trusting it in production.

What is robots.txt.liquid on Shopify?

It's a Liquid template, living in the same theme folder as your other layout files, that Shopify renders as the plain-text /robots.txt file every crawler checks before indexing your store.

The practical shift is this: robots.txt on Shopify went from "fixed and untouchable" to "editable, but inside a template you have to treat carefully."

Why robots.txt matters for a Shopify store

Shopify stores generate an unusually large number of near-duplicate URLs on their own — which is exactly where a tuned robots.txt earns its keep.

📊 Quick stat Stores that add filter and sort parameters to a custom robots.txt commonly see crawl requests shift measurably away from parameterized URLs and toward core product and collection pages within a few crawl cycles — the effect shows up in Search Console's crawl stats report, not overnight.

Step-by-step: editing robots.txt on Shopify

  1. Go to Online Store → Themes. Find your live (published) theme and click the "…" menu, then Edit Code.
  2. Open or create robots.txt.liquid. Check the Templates folder first. If it isn't there, click Add a new template, select robots.txt from the type dropdown, and Shopify will generate the default starting content.
  3. Read the existing groups before touching anything. The default file is organized into Liquid {% for %} blocks and comments — understand what each section already blocks before adding your own rules.
  4. Add your custom rules below the defaults. Append new Disallow or Allow lines for the specific paths or parameters you want to control, rather than editing Shopify's existing groups.
  5. Save the template. Changes to robots.txt.liquid take effect on the live file immediately after saving — there's no separate publish step.
  6. Check the live output. Visit yourstore.com/robots.txt in a browser to confirm your additions rendered correctly and the file is still valid plain text.
  7. Test key URLs in Search Console. Run the robots.txt Tester against a handful of important product, collection, and blog URLs to confirm they're still allowed.
# Example additions appended below Shopify's default groups User-agent: * Disallow: /*?sort_by= Disallow: /*?filter.* Disallow: /search Allow: / Sitemap: https://yourstore.com/sitemap.xml
Try the Rebrixe Robots.txt Generator — free Build clean, correctly-formatted rules to paste straight into robots.txt.liquid.
Generate Robots.txt →

Common mistakes to avoid

1. Deleting Shopify's default groups instead of adding to them

Removing the pre-filled Liquid blocks to "start clean" also removes the protections they provide, like keeping cart and checkout paths out of crawler reach.

2. Blocking collection or product paths with too broad a rule

A wildcard aimed at filter parameters can accidentally catch legitimate collection URLs if the pattern isn't scoped tightly enough, cutting off pages that were ranking fine.

3. Forgetting the file lives inside a specific theme

Switching to a new theme or duplicating one for a redesign doesn't carry robots.txt.liquid over automatically — it needs to be copied into the new theme manually or the store reverts to Shopify's defaults.

4. Assuming Disallow removes a page from search results

Blocking a URL in robots.txt stops crawling, not indexing — a blocked page that's linked elsewhere can still show up in results without a description, which surprises a lot of store owners.

💡 Pro tip Keep a copy of your custom additions outside Shopify — a text file or the generator output itself — so a theme change or accidental edit doesn't cost you the rules you built up over time.

Real-world examples

A few common ways store owners extend the default Shopify robots.txt for their specific catalog structure:

Large catalog store
Filter parameter blocking
Fewer duplicate URLs
Adds Disallow rules for ?sort_by= and ?filter.* to stop crawlers spending budget on filtered collection variants.
Multi-region brand
Locale path management
Cleaner crawl paths
Blocks draft or unused market subfolders in robots.txt.liquid while keeping live locale paths fully crawlable.
Content-heavy store
Blog tag pages
Thin pages excluded
Disallows /blogs/*/tagged/* paths that create thin, near-duplicate archive pages for every blog tag.
Apparel store
Internal search results
Search noise removed
Adds Disallow: /search to keep Shopify's on-site search result pages out of the crawl entirely.

Each example builds on top of Shopify's existing default file rather than replacing it, which keeps the platform's baseline protections intact.

Ways to manage Shopify robots.txt compared

The main approaches to controlling crawler access on a Shopify store, and where each one fits.

Method Setup effort Control level Best for
Editing robots.txt.liquid directly Moderate, needs care Full, native control Stores with specific crawl-budget issues
Robots.txt generator + paste Low, form-based rules Full, error-checked Store owners without a developer
Leaving Shopify's default file None, no setup Fixed, no customization Small catalogs with no duplicate-URL issues
Third-party SEO app Moderate, app install Depends on the app Stores wanting a visual rule builder

Generate your robots.txt rules right now — free

The Rebrixe Robots.txt Generator builds correctly-formatted Disallow, Allow, and Sitemap rules you can paste straight into your Shopify theme's robots.txt.liquid template. No account, no watermark, and no risk of a stray syntax error.

Free Robots.txt Generator Build your rules, then paste them into robots.txt.liquid.
Open Robots.txt Generator →

Frequently asked questions

Yes. Since mid-2021, Shopify lets every store override its default robots.txt by editing a robots.txt.liquid template under Online Store > Themes > Edit Code, instead of relying on the fixed file Shopify used to generate automatically.
Go to Online Store > Themes, click Edit Code on your live theme, and look in the Templates folder. If robots.txt.liquid isn't listed, click Add a new template, choose robots.txt, and Shopify will populate it with its default rules as a starting point.
It can, if you delete the default groups instead of adding to them. Shopify's starter template already blocks system paths like /admin and /checkout; removing those rules rather than building on top of them is what causes SEO problems.
Many stores add Disallow rules for parameters like ?sort_by= or /collections/*/*+* to stop crawlers wasting budget on near-duplicate filtered pages, but this should be done deliberately, one parameter at a time, not as a blanket rule that catches real collection pages.
No. Robots.txt only tells crawlers not to fetch a page; a URL can still appear in search results without a snippet if it's linked elsewhere. Removing a page from the index requires a noindex tag or Search Console removal request instead.
Visit yourstore.com/robots.txt directly in a browser to confirm the live output, then run that URL through Google's robots.txt Tester in Search Console to check that specific product, collection, or blog URLs are still allowed as intended.
No app is required since the robots.txt.liquid template is available on every plan; apps are only useful if you want a visual rule builder instead of editing the liquid file directly, or need to manage rules across many stores.

Build your Shopify robots.txt rules in seconds

The Rebrixe Robots.txt Generator builds clean, valid rules ready to paste into your theme's robots.txt.liquid template — no account, no watermark, nothing to code by hand.

Launch the Robots.txt Generator →
← Back to blogs