robots.txt for AI Crawlers: Allow ChatGPT Search and Perplexity
Copy-paste robots.txt rules to allow OAI-SearchBot and PerplexityBot while blocking training crawlers like GPTBot, plus how to fix Cloudflare edge blocks.
Published · 7 min read
To let AI assistants cite your small business without feeding your pages into model training datasets, allow search crawlers such as OAI-SearchBot, PerplexityBot and Claude-SearchBot in your /robots.txt file, and disallow training bots such as GPTBot and ClaudeBot. If your site sits behind Cloudflare or a web host firewall, also verify that AI search bots are not being blocked with a 403 error before they ever reach your robots.txt.
Many small business owners block AI bots by mistake. Either a security plugin added a blanket disallow rule, a developer copied an old snippet that blocked every OpenAI user-agent, or a CDN setting silently switched AI crawlers off. Once a search crawler cannot fetch your service pages, an assistant has to skip your website or rely on an outdated third-party directory instead.
Training crawlers vs. AI search crawlers: why one rule breaks visibility
Major AI companies separate crawlers into three jobs:
- Training crawlers download pages to train future foundation models (
GPTBot,ClaudeBot). - Search crawlers index pages so an assistant can surface and link your site on a live query (
OAI-SearchBot,PerplexityBot,Claude-SearchBot). - User-triggered fetchers visit a specific page on demand during a live prompt (
ChatGPT-User,Perplexity-User,Claude-User).
That split matters for a small business. You can keep your site out of model training datasets while still letting buyers asking for an emergency plumber or a nut-free bakery see your name and click your website. Blocking every bot with “AI” in its name cuts off both at once.
Watch one exception: Google’s Google-Extended is not a separate crawler. Per Google’s documentation on generative AI controls, it is a robots.txt token controlling both Gemini model training and grounding in Gemini Apps and Vertex AI. Blocking Google-Extended does not affect standard Google Search rankings or Google Search AI Overviews, but it does opt your pages out of Gemini grounding.
Which AI crawlers do what?
Use the table below to decide which user-agents to allow and which to disallow. Every bot role comes from each vendor’s official crawler documentation.
| User-Agent | Company | Job | Recommended for SMB visibility |
|---|---|---|---|
OAI-SearchBot | OpenAI | Indexes sites for ChatGPT Search answers and citations (OpenAI docs) | Allow |
ChatGPT-User | OpenAI | Fetches a live page on demand during a user's ChatGPT prompt | Allow |
GPTBot | OpenAI | Crawls content to train OpenAI foundation models | Optional (Disallow to opt out of training) |
PerplexityBot | Perplexity | Indexes sites for Perplexity answers and footnotes; not used to train foundation models (Perplexity docs) | Allow |
Perplexity-User | Perplexity | Fetches a page on demand for a user prompt; generally ignores robots.txt | Allow (do not block in WAF) |
Claude-SearchBot | Anthropic | Indexes pages for Claude web search results (Anthropic docs) | Allow |
Claude-User | Anthropic | Fetches live pages on demand for a user's Claude prompt | Allow |
ClaudeBot | Anthropic | Collects public web content to train Claude models | Optional (Disallow to opt out of training) |
Google-Extended | Standalone robots.txt token controlling Gemini training and grounding, not standard Google Search (Google docs) | Allow if targeting Gemini visibility |
Googlebot and Bingbot should also remain allowed.Keep Googlebot and Bingbot allowed as well. OpenAI’s ChatGPT Search help page notes that ChatGPT pairs its own crawler with external search partners including Microsoft Bing, so blocking Bingbot can quietly reduce how often ChatGPT finds your site even if OAI-SearchBot is allowed.
Copy-paste robots.txt: allow AI search, block AI training
Use this template if you want buyers to find and click your business in ChatGPT, Perplexity, Claude and Gemini while opting out of dedicated training crawlers where vendors separate them.
# Standard search crawlers
User-agent: *
Allow: /
# Allow AI search and live user-triggered fetchers
User-agent: OAI-SearchBot
Allow: /
User-agent: ChatGPT-User
Allow: /
User-agent: PerplexityBot
Allow: /
User-agent: Perplexity-User
Allow: /
User-agent: Claude-SearchBot
Allow: /
User-agent: Claude-User
Allow: /
# Allow Gemini grounding and search-linked answers
# Change to Disallow: / if opting out of Gemini training matters more to you than Gemini grounding
User-agent: Google-Extended
Allow: /
# Block dedicated AI model training crawlers
User-agent: GPTBot
Disallow: /
User-agent: ClaudeBot
Disallow: /
Sitemap: https://yourdomain.example/sitemap.xml
Replace yourdomain.example with your real domain, or remove the Sitemap: line if your site does not publish an XML sitemap yet. If you already disallow private paths such as /wp-admin/ or /cart/ under User-agent: *, repeat those Disallow: lines inside every named User-agent: block you add. We explain why in the mistakes section below.
Copy-paste robots.txt: allow all AI crawlers
Most local service businesses, restaurants, clinics and shops publish public pages whose sole job is bringing in customers: services, prices, hours, service areas and booking steps. Unless you publish paywalled work you want excluded from training sets, a short permissive file is simpler to maintain and harder to break.
User-agent: *
Allow: /
Disallow: /wp-admin/
Sitemap: https://yourdomain.example/sitemap.xml
Under Google’s robots.txt specification guide, User-agent: * applies to every compliant crawler without its own specific block. Swap /wp-admin/ for whichever private admin or checkout path your platform uses, or remove that line if none applies.
Why is Cloudflare blocking ChatGPT when your robots.txt allows it?
A clean robots.txt on your host will not help if Cloudflare blocks AI crawlers before requests reach your server.
In Cloudflare’s AI Crawl Control documentation, Cloudflare moved its earlier “Block AI Bots” and “Managed robots.txt” switches into AI Crawler and Agent access policies and Bot Preference Sync. Two settings catch small businesses off guard:
- Prepended managed
robots.txtrules. With Bot Preference Sync turned on alongside a restrictive policy, Cloudflare injects its own directives at the top of your live/robots.txtinside a# BEGIN Cloudflare Managed Contentblock, alongsideContent-Signaldirectives. Your CMS editor will not show those injected lines; you only see them when loadinghttps://yourdomain.com/robots.txtin a browser. - Edge HTTP 403 blocks. Setting a policy to Block makes Cloudflare return
403 Forbiddenat the edge before the crawler ever reads your originrobots.txt.
To fix Cloudflare in two minutes:
- Open the Cloudflare dashboard and select your domain.
- Go to Security > Settings (or AI Crawl Control) and open AI Crawler and Agent access policies.
- Set Search and Agent to Allow so AI search crawlers and live user fetchers are not blocked at the edge. Set Training to Allow or Disallow based on your preference.
- Save, then open
https://yourdomain.com/robots.txtto verify Cloudflare is not prepending conflictingDisallowlines.
If you run custom firewall rules, OpenAI and Perplexity publish official crawler IP lists (openai.com/searchbot.json, perplexity.ai/perplexitybot.json, perplexity.ai/perplexity-user.json) so your developer can verify real bot traffic.
How to test whether your site blocks AI search bots today
Run three quick checks in order:
- Open your live
robots.txtin a private browser window. Visithttps://yourdomain.com/robots.txtdirectly rather than trusting a CMS screen. Search the page for# BEGIN Cloudflare Managed Content,Disallow,OAI-SearchBot,PerplexityBotandGoogle-Extended. - Check your CDN and security plugins. Review Cloudflare’s AI Crawl Control policies and any WordPress security plugin toggle labeled “Block AI bots” that fails to separate search crawlers from training scrapers.
- Run a free homepage technical check. Enter your domain on the MentionTally home page. Alongside your 0 to 100 visibility score, the results page checks your live
robots.txtfor blocked AI crawlers, plus your sitemap, homepage structured data andllms.txt (optional).
Wait before re-testing AI answers. OpenAI and Perplexity document that robots.txt changes take around 24 hours to register, and re-indexing takes longer. If you already use an SEO suite, see our comparison on technical AI readiness crawls vs. buyer-answer checks.
Common robots.txt mistakes that hide small businesses
- Forgetting that named blocks override
User-agent: *. Under the Robots Exclusion Protocol (RFC 9309), once a crawler matches a specificUser-agent:group (such asOAI-SearchBot), it ignoresUser-agent: *completely. Copy any privateDisallow:paths (like/wp-admin/or/checkout/) into every named bot block you add. - Blocking
OAI-SearchBotwhen you meantGPTBot. Old snippets grouped every OpenAI user-agent underDisallow: /. KeepOAI-SearchBotallowed if you want ChatGPT Search citations. - Treating
robots.txtas access control.robots.txtonly guides compliant crawlers; never rely on it to protect private files. - Prioritizing
llms.txtoverrobots.txt. A brokenrobots.txthides your whole site, whereasllms.txtis optional for local sites (see do small businesses need llms.txt?). - Stopping at crawler access. Unblocking bots lets assistants read your pages, not recommend you if prices, hours and service areas are still missing. Once bots can crawl, read why a business does not show up in ChatGPT or check which pages ChatGPT cites for a competitor.
Check your robots.txt and AI visibility score in one scan
The free MentionTally check asks AI assistants the questions a buyer in your category would ask, calculates a deterministic score from 0 to 100 (see how MentionTally calculates your score), and runs a homepage technical check listing any AI crawlers blocked in robots.txt. No email or account is needed.
If bots are blocked or your score is low, the $9 one-time repair report includes the buyer questions, full answers, cited pages, prioritised fixes with evidence, and paste-ready robots.txt lines and JSON-LD files where your site needs them. No subscription and no dashboard. Because scans run through APIs rather than a signed-in buyer’s app, treat the report as an editing starting point and re-test after publishing.
Frequently asked questions
What is the difference between GPTBot and OAI-SearchBot?
According to OpenAI's crawler documentation, GPTBot collects web content to train foundation models, while OAI-SearchBot indexes websites so they can appear as answers and links inside ChatGPT Search. You can allow OAI-SearchBot and disallow GPTBot independently in robots.txt.
If I block GPTBot, will my business disappear from ChatGPT Search?
No. OpenAI documents GPTBot and OAI-SearchBot as separate controls, so blocking GPTBot opts your site out of model training without removing your pages from ChatGPT Search, as long as OAI-SearchBot is still allowed and your CDN does not block it at the edge.
Why is Cloudflare blocking ChatGPT even when my robots.txt allows it?
Cloudflare's AI Crawl Control can either prepend managed disallow rules to your live robots.txt through Bot Preference Sync or block AI crawler traffic directly at the edge with an HTTP 403 response before requests ever reach your server. Check Security > Settings > AI Crawler and Agent access policies in your Cloudflare dashboard.
Should small businesses allow PerplexityBot and Google-Extended?
Yes if you want visibility in Perplexity and Google Gemini. Perplexity documents that PerplexityBot is used for search indexing rather than training foundation models. Google documents that Google-Extended controls both Gemini training and Gemini grounding from the Google Search index, so blocking it can limit how Gemini uses your site without affecting standard Google Search.