What Shopify generates for you
Out of the box, Shopify builds a robots.txt that already disallows the paths that should not be crawled, such as cart, checkout, account, and internal search and filter URLs that would otherwise create endless duplicate pages. It also points to your sitemap. This default is genuinely good for SEO, which is why Shopify long argued there was no need to edit it. For the majority of stores, the generated file does the right thing without any intervention.
The catch was that good defaults are not the same as your defaults. If you wanted to block a particular bot, allow a path Shopify disallowed, or layer in protection against the wave of AI training crawlers, you were stuck. The robots.txt.liquid template exists to close that gap while keeping Shopify in charge of the baseline, so you are adding to a maintained foundation rather than replacing it wholesale.
Editing through robots.txt.liquid
To customize the file, go to your Shopify admin, open Online Store, then Themes, click the three-dot menu, and choose Edit code. Under the Templates folder, add a new template and select robots.txt.liquid from the list. Shopify scaffolds it with its default logic intact, expressed through Liquid objects that loop over rule groups. You then add your own rules around or inside that logic, rather than deleting the defaults, so the safe baseline stays in place.
To add a block, you insert a directive for the user-agent you want to stop. For example, to keep an AI scraper out you add a group that targets GPTBot or ClaudeBot with a Disallow line for the whole site. Because it is Liquid, you can also conditionally remove a default rule if you genuinely need to, but most stores only ever add. Save the template and Shopify will serve the merged result at /robots.txt immediately, no deploy step required.
Translating a robot.guard set into the template
The cleanest workflow is to design your rules in robot.guard first, where you can toggle which search bots to keep allowed and switch on blocks for the curated, maintained list of AI scrapers, then preview the result. You will not paste that file verbatim into Shopify, because Shopify wants its directives expressed through the Liquid template, but the generated output is your reference for exactly which user-agents to Disallow and which paths to leave open.
In practice that means reading each User-agent and Disallow pair from your robot.guard file and adding a matching rule group to robots.txt.liquid. Keep Shopify's existing cart and checkout disallows, leave Googlebot and Bingbot allowed so your search ranking is untouched, and add the AI-scraper blocks on top. Remember the limits: you cannot change the URL, you cannot remove Shopify's deeper structural protections, and your edits live with the theme, so they need re-applying if you switch to a theme that lacks the template.
how it works
- 01
Decide your rules in robot.guard
Whitelist search bots, toggle on blocks for AI scrapers like GPTBot, ClaudeBot, and CCBot, and preview the generated robots.txt as your reference.
- 02
Open theme code
In Shopify admin go to Online Store, then Themes, click the three-dot menu, and choose Edit code.
- 03
Add the template
In the Templates folder, click Add a new template and select robots.txt.liquid. Shopify scaffolds it with the default rules intact.
- 04
Insert your blocks
Add rule groups that target each AI-scraper user-agent from your robot.guard reference with a Disallow line, layered on top of Shopify's defaults.
- 05
Keep the safe defaults
Leave Shopify's cart, checkout, and account disallows in place, and keep Googlebot and Bingbot allowed so search ranking is unaffected.
- 06
Save and verify
Save the template, then visit yourstore.com/robots.txt to confirm your added rules appear alongside Shopify's defaults.
frequently asked
- Can I edit robots.txt on Shopify at all?
- Yes, now you can. Shopify once locked the file entirely, but it now supports customization through the robots.txt.liquid theme template, where you can add and conditionally remove directives.
- Can I block AI scrapers on Shopify?
- Yes. In robots.txt.liquid you add rule groups targeting AI-crawler user-agents such as GPTBot, ClaudeBot, and CCBot with a Disallow directive, layered on top of Shopify's default rules.
- What can't I change?
- You cannot move robots.txt off the /robots.txt path, and you should not strip Shopify's structural protections for cart, checkout, and account URLs. Edits also live with the theme, so they do not carry over automatically when you switch themes.
- Will I lose my rules if I change themes?
- Possibly. Because robots.txt.liquid is a theme template, a new theme without it falls back to Shopify's defaults. Re-add the template after switching, using your robot.guard set as the reference.
Last updated June 9, 2026