robots.txt Builder
BetaEdit your Shopify robots.txt the safe way. Block AI training bots or extra pages, keep Shopify’s default rules, and test any page before you save.
What you’ll need
A duplicate of your theme to test on
How to get this: A duplicate of your theme to test on
- Online Store › Themes › … on your theme › Duplicate.
- Make the change on the copy, preview it, and publish only when it works.
The theme code editor (to paste a snippet)
How to get this: The theme code editor
- On the copy of your theme: … › Edit code.
- Hover the snippets folder, click New File…, name it as the tool says, paste and Save.
Shopify lets you change robots.txt with a robots.txt.liquid theme template. Choose what to block below, download the template and paste it into your theme. It keeps Shopify’s default rules, so carts and checkouts stay out of Google and future Shopify updates still apply.
1AI crawlers
2Extra pages to keep out of search (optional)
3Your robots.txt.liquid
4Preview and test
5Add it to your theme
- In Shopify go to Online Store › Themes. To try it first, click ⋯ › Duplicate on your current theme and use the copy; otherwise use your current theme. Click ⋯ › Edit code.
- Under Templates click Add a new template and choose robots.txt. Shopify creates templates/robots.txt.liquid with its default code.
- Select all of that code, paste the downloaded template over it and click Save.
- On a copy: click Preview, then open yourstore.com/robots.txt in the same browser. While you preview a theme, Shopify serves that theme’s robots.txt, so you can check it against the builder’s preview. Then publish the copy.
- On your current theme the change is live as soon as you save. Open yourstore.com/robots.txt and check it matches the builder’s preview.
- To undo, delete templates/robots.txt.liquid. Shopify goes back to its default robots.txt.
1Paste your robots.txt
Open yourstore.com/robots.txt, select all and copy. It’s read in this browser only.
Try: ·
2Results
Results show here: whether Google can reach your products, which AI crawlers are blocked, and a tester for any page.
How it works
- Choose which AI crawlers to block, if any.
- Add any extra pages you want kept out of search.
- Download robots.txt.liquid and check the preview, testing your key pages.
- Add it under Templates in your theme’s code editor and check yourstore.com/robots.txt.
Guides
Questions
Can I edit robots.txt on Shopify?
Yes. Add a robots.txt.liquid template to your theme (Online Store › Themes › Edit code › Templates › Add a new template › robots.txt). Shopify serves whatever that template outputs at yourstore.com/robots.txt. Delete the template to go back to Shopify’s default.
Will blocking AI bots hurt my Google rankings?
No. GPTBot, ClaudeBot, Google-Extended and the other training bots are separate from Googlebot, which handles Google Search and AI Overviews. Blocking a training bot doesn’t change how Google crawls you.
Should I block ChatGPT and Perplexity?
Block their training bots if you don’t want your pages used to train models. Think twice before blocking their search bots (OAI-SearchBot, PerplexityBot, Claude-SearchBot): that takes your store out of the answers that link shoppers to you.
Why keep Shopify’s default rules?
They stop Google crawling carts, checkouts, accounts and thousands of filtered collection URLs. The template keeps Shopify’s loop, so when Shopify updates its defaults your store gets the update too.
Does Shopify Support help with robots.txt changes?
Shopify says editing robots.txt.liquid is an unsupported customization, so their support team won’t fix a broken one. That’s why the builder previews the result and lets you test pages before you save, and why deleting the template is a clean undo.
How do I remove a page from Google?
Not with robots.txt: it stops crawling, not indexing. Let Google crawl the page and add a noindex tag, or remove the page and let it return 404.
Based on Shopify’s robots.txt.liquid docs, Shopify’s Help Center and Google’s robots.txt spec. The robots.txt Shopify serves from the template matches this page’s preview line for line, and the default template reproduces Shopify’s own robots.txt exactly.