Guides / Product data and technical SEO

How to allow or block ChatGPT and other AI crawlers on Shopify

SHORT ANSWER

First open yourstore.com/robots.txt and see what it already says; Shopify's default file works for most stores. To add a rule for one bot, such as OAI-SearchBot or GPTBot, create a robots.txt.liquid template in your theme, keep Shopify's default rules with its Liquid loop, and add a separate User-agent group below it.

If you want your products to appear in ChatGPT search or Perplexity, their search crawlers need to be able to read your store. If you do not want your content used for AI training, you may want to block a training crawler instead. Here is how to check and change this on Shopify without breaking anything.

Step 1: look at what your store says now

Open yourstore.com/robots.txt in a browser. Look for lines that start with User-agent: and name a bot such as GPTBot, OAI-SearchBot or PerplexityBot. If a bot is not named, it follows the rules in the User-agent: * group.

Step 2: decide which bots you want

  • OAI-SearchBot: OpenAI says it surfaces websites in ChatGPT search. Allow it if you want to appear there.
  • GPTBot: OpenAI says it crawls content that may be used to train its models. Blocking it is a choice about training, not about search visibility.
  • PerplexityBot: Perplexity says it surfaces and links websites in its search results and is not used for training foundation models.
  • Googlebot: Google says its AI features need no special optimisation beyond normal SEO, so do not block it.

Step 3: create robots.txt.liquid

In Shopify admin, go to Online Store > Themes and open the code editor for your live theme. Shopify's documentation says to right-click the Templates folder, click New File and name it robots.txt.liquid. Adding this template replaces Shopify's generated robots.txt, so it must reproduce the default rules.

Shopify's documentation outputs the default rules with a Liquid loop and adds custom rules for one crawler below it. Following that pattern, a template that keeps Shopify's defaults and blocks only GPTBot looks like this:

{% 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: GPTBot
Disallow: /

To explicitly allow a crawler instead, Shopify's example uses the same pattern with Allow: / in place of Disallow: /.

Step 4: check before and after

  • Before you save, copy your current robots.txt into a text file. Shopify recommends comparing it with the new output, because the rendered template does not always match Shopify's generated file exactly.
  • Do not remove Shopify's default rules. They keep pages such as cart, checkout and account areas out of search.
  • After saving, open yourstore.com/robots.txt again and confirm the new group appears at the end.
  • OpenAI says a robots.txt change can take about 24 hours to take effect in ChatGPT search.

Test it in 20 seconds

Our free scan reads your robots.txt and reports the rules for 11 search and AI crawlers, plus what a crawler can read on the page itself.

Common questions

Does Shopify block ChatGPT by default?

Do not assume either way. Shopify generates the default file, and the only reliable answer for your store is to open yourstore.com/robots.txt and look for the bot's name.

Will blocking GPTBot remove my store from ChatGPT?

Not from ChatGPT search. OpenAI says OAI-SearchBot is what surfaces sites in ChatGPT search, and that each setting is independent.

Can I break my store's SEO by editing robots.txt.liquid?

Yes, if you remove the default rules or block product and collection paths. Keep Shopify's Liquid loop, add only the lines you need, and compare the output with your saved copy.

Sources

Free tools: AI crawler checker · llms.txt generator · robots.txt AI rules generator