If you've ever tried to find your robots.txt file in Shopify, you probably hit a wall. There's no field for it in the admin, no obvious setting, nothing. So most store owners assume it's locked and move on. That assumption is wrong, and it might be the reason ChatGPT or Perplexity never mentions your store when a shopper asks what to buy.
Since June 2021, Shopify lets you override the default robots.txt with a template called robots.txt.liquid. Once you add it, you control exactly which crawlers get in and which get turned away. That includes the AI bots that decide whether your products show up inside AI answers. This is a click-by-click walkthrough for a non-developer. No coding background needed, just careful copy and paste.
Why robots.txt matters for AI visibility now
Robots.txt is a plain text file at the root of your domain (yourstore.com/robots.txt) that tells automated crawlers what they're allowed to fetch. For years this was a search-engine thing: let Googlebot in, keep junk pages out. Now there's a new set of visitors. AI assistants send their own crawlers, and some of them are the difference between being cited in an answer and being invisible.
Here's the part people get wrong. Not all AI bots do the same job. Some fetch your pages so an assistant can read and cite you live when a shopper asks a question. Others crawl the web to train future models. Blocking the wrong one, or blocking everything in a panic, can quietly remove you from the answers where buyers actually are. If you're not sure what's currently allowed on your store, it's worth checking whether your store is already blocking AI crawlers before you change anything.
Step by step: add the robots.txt.liquid template
This lives in your theme code, but you won't be writing logic. You're adding one file and pasting text into it. Follow this exactly.
From your Shopify admin, go to Online Store > Themes. Find your live theme, click the three-dot menu (or the "..." button) next to it, and choose Edit code. This opens the code editor. Don't be intimidated, you're only adding one new file.
In the left sidebar, look for the Templates folder and click Add a new template. A small dialog appears asking what kind of template to create. Change the dropdown from the default (usually "page") to robots.txt. Shopify names the file robots.txt.liquid for you. Click Create template (or "Done").
Shopify pre-fills the new file with a snippet that reproduces the default rules. That default block is fine and you should keep it. The key line in there is {{ robots.default_rules }}, which renders Shopify's standard rules so you don't lose anything important. You're going to add your own AI bot rules around it.
Which AI bots to allow and which to block
Before the snippet, know who you're dealing with. These are the names you'll see in robots.txt as User-agent values, and what each one actually does:
- OAI-SearchBot and ChatGPT-User: these fetch pages so ChatGPT can find and cite your store live in answers. Allow these if you want to show up in ChatGPT. GPTBot is OpenAI's training crawler. Allowing it is generally fine, but it's the one people block when they don't want their content used for model training.
- PerplexityBot powers Perplexity's answers and citations. Google-Extended controls whether Google uses your content for Gemini and AI features (it does not affect normal Google Search). ClaudeBot is Anthropic's crawler for Claude.
My honest take for a store that wants sales: allow the search and citation bots. Those are the ones putting you in front of a shopper who is actively asking what to buy. If you have a real reason to opt out of training (some brands do), you can block the training-only crawlers. But read the warning below first, because the line between "training" and "citation" is blurrier than it looks.
Blocking a training bot can quietly kill your citation visibility too. Some assistants lean on content they crawled earlier to decide who's worth recommending, so a hard block today can mean you simply don't exist in tomorrow's answers.
The copy-paste snippet to allow AI bots
Here's a clean version that keeps Shopify's defaults and explicitly welcomes the AI bots that drive visibility. Paste this into your robots.txt.liquid file, replacing what's there if you're comfortable, or adding the AI lines alongside the default block:
{% for group in robots.default_groups %}
{{- group.user_agent }}
{% for rule in group.rules %}{{ rule }}{% endfor %}
{%- if group.sitemap != blank %}{{ group.sitemap }}{% endif %}
{% endfor %}
User-agent: OAI-SearchBot
Allow: /
User-agent: ChatGPT-User
Allow: /
User-agent: PerplexityBot
Allow: /
User-agent: ClaudeBot
Allow: /
User-agent: Google-Extended
Allow: /
User-agent: GPTBot
Allow: /
That first loop is Shopify's recommended way to render the default rules group by group, so you don't accidentally break normal search crawling. Everything after it is your explicit "yes, come in" message to the AI bots. If you want to block one instead, change its Allow: / to Disallow: / under that bot's User-agent line. For example, to opt out of OpenAI training only, you'd set GPTBot to Disallow: / while leaving OAI-SearchBot on Allow: /.
A note on blocking, since it's easy to overdo
If your goal is to be recommended by AI assistants, the safest move is to allow the search and citation bots without exception. The training-only block is a values decision, not a sales decision, and even then it can backfire on visibility. When in doubt, allow.
Save, test, and confirm it's live
Click Save in the code editor. The change goes live on your published theme right away. To check it worked, open a new browser tab and go to yourstore.com/robots.txt (use your real domain). You should see your AI bot rules sitting below Shopify's defaults. If you still see only the old default file, make sure you edited the code on your live theme and not a draft.
What if I use a custom domain or headless setup?
If your store runs on a standard Shopify theme, the steps above are all you need. If you're on Hydrogen or a custom headless front end, robots.txt is served differently and you'll handle it in your app code instead of the theme editor. Most merchants reading this are on a normal theme, so you're fine.
Re-run your audit after you save
Editing the file is step one. The real question is whether it changed anything: does an AI assistant now actually surface your store when a shopper asks for a recommendation in your category? Don't guess. After you save, give the crawlers a little time, then check your visibility properly. You can run a free AI visibility audit to see whether ChatGPT, Perplexity, and Google's AI answers now mention your store, which competitors show up instead, and what else is holding you back.
Robots.txt is the gate. Opening it is necessary, but it's not the whole job. Get the gate open first, then go fix the rest.
See where your store stands
Run a free AI Visibility Audit and find out if AI recommends you.
Get my free audit →Questions store owners ask
Is robots.txt really editable in Shopify?
Yes. Since June 2021 you can override the default by adding a robots.txt.liquid template under Online Store > Themes > Edit code > Add a new template. Before that it was locked, which is why a lot of older advice says you can't touch it.
Should I block GPTBot on my Shopify store?
Only if you specifically want to opt out of OpenAI training, and even then think twice. GPTBot is the training crawler, while OAI-SearchBot and ChatGPT-User handle live citations. Blocking the wrong one can remove you from the answers where shoppers are. If your goal is sales, allowing them is the safer choice.
How do I know if my changes worked?
Save the template, then visit yourstore.com/robots.txt in a browser to confirm your AI bot rules appear below Shopify's defaults. After that, re-run an AI visibility audit to see whether assistants actually mention your store now.
AI VISIBILITY