Unblock AI crawlers: robots.txt, Cloudflare, Shopify

Unblock GPTBot, OAI-SearchBot, ClaudeBot and PerplexityBot: choose search vs training bots, fix robots.txt, then check Cloudflare and Shopify.

Example split view: robots.txt allows GPTBot, but the server still answers GPTBot with a 403

If ChatGPT, Claude or Perplexity can't fetch your pages, they can't use them in answers. Blocks usually come from one of two places: a rule in robots.txt, or a firewall or CDN that turns bots away before robots.txt is even considered. This guide covers both, with notes for Cloudflare and Shopify. It also covers the step most guides skip: deciding which AI bots you actually want to let in.

First, decide: search bots, training bots, or both

AI companies run more than one crawler, and each has a different job. The company docs describe them like this:

User agent Company What it's for
OAI-SearchBot OpenAI Surfacing sites in ChatGPT search results
GPTBot OpenAI Crawling content that may be used to train models
ChatGPT-User OpenAI Visiting a page when a user asks; robots.txt rules may not apply
Claude-SearchBot Anthropic Indexing content to improve search results
ClaudeBot Anthropic Collecting content that could contribute to training
Claude-User Anthropic Fetching pages when a Claude user asks
PerplexityBot Perplexity Surfacing and linking sites in Perplexity search; not used for foundation model training
Perplexity-User Perplexity Fetching pages for a user's question; generally ignores robots.txt

Sources: OpenAI, Anthropic, Perplexity.

OpenAI says these settings are independent: you can allow OAI-SearchBot to appear in ChatGPT search while disallowing GPTBot from training. Sites opted out of OAI-SearchBot "will not be shown in ChatGPT search answers, though can still appear as navigational links."

So there are two reasonable choices:

  • Allow search and user bots, block training bots. You stay findable in AI search and opt out of model training.
  • Allow everything. Some businesses are happy for their content to be used in training too.

Either is fine. The problem is blocking search bots by accident. Pick one on purpose, then make your robots.txt and firewall agree with it.

Step 1: check what's blocked now

Before changing anything, look at what crawlers actually get:

  1. Open yoursite.com/robots.txt and look for User-agent groups naming AI bots, plus any User-agent: * group with Disallow: /.
  2. Request a page as a browser and as an AI bot, and compare status codes. A 200 for the browser and a 403 or a challenge page for the bot means something at the network layer is blocking it.

Our free check runs both in about 30 seconds and scores them. It parses robots.txt for 15 AI user agents and runs a GPTBot firewall test, browser vs GPTBot. See your score and top issue free, then unlock the full report. Each check's result is in the full report, part of paid plans starting with Pro Monitoring.

Step 2: fix robots.txt

robots.txt rules are grouped by User-agent. A crawler follows the group that names it most specifically. If no group names it, it falls back to User-agent: *.

Example: allow AI search bots, block training bots

# Example only: adapt to your site
User-agent: OAI-SearchBot
Allow: /

User-agent: Claude-SearchBot
Allow: /

User-agent: PerplexityBot
Allow: /

User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

User-agent: *
Allow: /

Sitemap: https://example.com/sitemap.xml

Example: allow all AI bots

# Example only
User-agent: *
Allow: /
Disallow: /admin/

Sitemap: https://example.com/sitemap.xml

Example: the accidental block to look for

# Example of a mistake: blocks every bot without its own group
User-agent: *
Disallow: /

This often comes from a staging site that went live with its robots.txt still in place.

A few things to know:

  • Changes take time. OpenAI says it can take about 24 hours for ChatGPT search to adjust after a robots.txt update, and Perplexity says up to 24 hours.
  • robots.txt is advisory. Anthropic says its bots honour robots.txt. Both OpenAI and Perplexity say their user-initiated fetchers may not follow it.
  • Use robots.txt, not IP blocks, to opt out. Anthropic notes that blocking its IP addresses "may not work correctly or persistently guarantee an opt-out", because it stops its bots from reading your robots.txt.
  • Subdomains need their own file. Anthropic's instructions say to add rules "for every subdomain that you wish to opt out from".

Step 3: Cloudflare (and other firewalls/CDNs)

robots.txt can say Allow: / while your CDN still blocks the bot. Cloudflare offers AI bot controls, documented in Block AI Bots. According to that page (last updated 1 Jul 2026):

  • Cloudflare groups AI bots by behaviour: Search, Agent (acting in real time for a person, such as chat fetch bots) and Training (including mixed-purpose crawlers used for both training and search).
  • Each group can be set to Block (on all pages), Block on pages with ads, or Allow (do not block), under Security Settings > Configure AI bot policies.
  • New defaults for new domains, starting 15 September 2026: bots classified as Training or Agent are blocked on pages that display ads, and Search stays allowed. Mixed-purpose crawlers are blocked by every configuration that blocks AI training, including the legacy "Block AI bots" option. That option is being deprecated.

What this means in practice:

  1. Open your Cloudflare dashboard and check the AI bot policies for your domain. Set Search to Allow if you want to appear in AI search.
  2. Set Agent based on whether you want assistants to fetch pages for users. If you choose to block Training, any crawler Cloudflare classes as mixed-purpose will be blocked too.
  3. Check custom WAF rules, rate limits and bot-fight settings that match on user agent. A broad rule can catch AI bots without anyone intending it.

For other WAFs, Perplexity's docs recommend allowing its bots by combining a user-agent match with its published IP ranges, and give steps for Cloudflare WAF and AWS WAF. OpenAI publishes IP ranges for GPTBot, OAI-SearchBot and ChatGPT-User on its bots page. Matching on IP as well as user agent stops a scraper that is only pretending to be GPTBot.

After any change, run the browser vs bot comparison again.

Step 4: Shopify

Shopify has its own setup, described in its help article Editing robots.txt.liquid:

  • Every store has a default robots.txt that Shopify maintains. It allows public content and disallows things like /admin, /cart/, /checkout and account pages.
  • To change it, you add a robots.txt.liquid template to your theme: Online Store > Edit code > Add a new template > robots. Shopify recommends using Liquid to add or remove rules rather than replacing the whole file with plain text, so its future updates still apply.
  • Shopify calls this an unsupported customization. Its support team can't help with edits, and it warns that incorrect use "can result in loss of all traffic".
  • The network layer is handled by Shopify. Shopify says bot management is handled for stores on Shopify, and it doesn't recommend a proxy (such as Cloudflare) in front of a store.
  • Agentic storefronts are separate. If you sell through agentic storefronts such as ChatGPT or Microsoft Copilot, Shopify says your product data reaches them through Shopify Catalog, independently of robots.txt. Blocking crawlers affects only open-web discoverability.

For most Shopify stores the default robots.txt doesn't block AI search bots. The first thing to check is whether a theme or app added a custom robots.txt.liquid with extra Disallow groups.

Step 5: confirm it worked

  1. Re-open /robots.txt and confirm the live file matches what you intended. Caches and CDNs can serve an old copy.
  2. Re-run the browser vs bot request and look for a 200 for each bot you allowed.
  3. Wait about a day, as the OpenAI and Perplexity docs suggest, before judging whether search results changed.

Unblocking removes a technical barrier. It doesn't guarantee that ChatGPT or Perplexity will cite you; that also depends on your content and what others say about you. Once bots can get in, the next things to check are whether your content shows without JavaScript and whether you have structured data.

FAQ

Should I block GPTBot? It is your choice. OpenAI says GPTBot (training) and OAI-SearchBot (ChatGPT search) are independent, so you can block GPTBot and still allow OAI-SearchBot to appear in ChatGPT search.

Why are AI bots blocked when robots.txt allows them? A firewall or CDN can block bots before robots.txt matters. Cloudflare's AI bot policies, for example, can block Search, Agent or Training bots, and new domains from 15 September 2026 block Training and Agent bots on pages with ads by default.

How do I edit robots.txt on Shopify? Add a robots.txt.liquid template to your theme (Online Store > Edit code > Add a new template > robots). Shopify calls this an unsupported customization and recommends editing with Liquid rather than replacing the file.

How long do robots.txt changes take? OpenAI says about 24 hours for ChatGPT search to adjust. Perplexity says up to 24 hours.

Check your crawler access now

The free check parses robots.txt for 15 AI user agents, runs the GPTBot firewall test and checks four more things, in about 30 seconds. Your score is free, with no account needed.

Run the free AI visibility check →