Generate Report →

Optimizing Robots.txt for AI Agents: GPTBot, Perplexity & Claude

GPTBot, OAI-SearchBot, ClaudeBot, PerplexityBot, Google-Extended: what each AI user agent does and the exact robots.txt policy that fits your citation goals.

Is your robots.txt still written for a world where “crawler” meant Googlebot and Bingbot? Most are. Meanwhile, a dozen AI user agents with completely different jobs — training collectors, answer-engine indexers, on-demand page fetchers — are reading that same file and applying whatever blanket rule they find, or no rule at all.

The stakes cut both ways. An overly permissive file donates your entire archive to model training you may never have agreed to. An overly aggressive one — the reflexive Disallow: / for anything with “AI” in the name — quietly removes you from ChatGPT Search and Perplexity citations, which is traffic real buyers arrive from. Getting this right requires knowing what each user agent actually does, because the correct policy is almost never the same for all of them.

Here is the complete agent-by-agent map, a decision framework, and a production-ready file you can adapt in ten minutes.

What Does Each AI User Agent Actually Do?

The single most common robots.txt mistake is treating one company as one bot. Every major operator runs multiple agents with separate functions and separate controls:

User AgentOperatorFunctionBlocking It Means
GPTBotOpenAITraining data collectionContent excluded from future GPT training
OAI-SearchBotOpenAIChatGPT Search indexNo ChatGPT Search citations
ChatGPT-UserOpenAIUser-triggered live fetchChatGPT can’t open your URLs on request
ClaudeBotAnthropicTraining data collectionContent excluded from Claude training
Claude-UserAnthropicUser-triggered live fetchClaude can’t open your URLs on request
PerplexityBotPerplexityAnswer-engine indexNo Perplexity citations
Google-ExtendedGoogleGemini training control tokenOpts out of Gemini training; Search unaffected
CCBotCommon CrawlOpen web archiveExcluded from Common Crawl (feeds many labs)

Note what is not on the list: Googlebot. Google AI Overviews draw on the ordinary Search index, so there is no robots.txt lever that removes you from AI Overviews without also removing you from Search. Google-Extended only governs Gemini training and grounding.

Which Policy Fits Your Business?

Three coherent positions, in descending order of openness:

1. Full participation. Allow everything. Right for brands whose economics depend on being known — B2B SaaS, consultancies, local services — where a training-data appearance in next year’s models is marketing, not theft. If discovery matters more to you than control of the corpus, staying maximally visible is the coherent position.

2. Citations yes, training no. Allow OAI-SearchBot, PerplexityBot, and the user-fetch agents; disallow GPTBot, ClaudeBot, CCBot, and Google-Extended. Right for publishers whose content is the product. You keep the referral and citation surface while withholding the training corpus.

3. Full withdrawal. Disallow all of the above. Coherent only for paywalled or licensing-first businesses — and remember it removes you from answer engines your buyers increasingly use, a trade-off worth weighing against what the Pew Research browsing study found about click behaviour on AI-summarised results.

The middle position fits most content businesses. Here it is as a complete file:

# --- Search engines: unrestricted ---
User-agent: Googlebot
Allow: /

User-agent: Bingbot
Allow: /

# --- AI answer engines: allowed (citations wanted) ---
User-agent: OAI-SearchBot
Allow: /

User-agent: PerplexityBot
Allow: /

User-agent: ChatGPT-User
Allow: /

User-agent: Claude-User
Allow: /

# --- AI training collectors: refused ---
User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

User-agent: CCBot
Disallow: /

User-agent: Google-Extended
Disallow: /

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

Spelling and casing matter — GPT-Bot or Claudebot matches nothing. And keep Bingbot allowed if you want ChatGPT Search visibility: OpenAI’s search experience leans heavily on Bing’s index, so a Bingbot block is a de facto ChatGPT Search block regardless of your OAI-SearchBot rule.

How Do You Know the Rules Are Working?

Robots.txt is a request. Verification is a log exercise:

  1. Confirm compliant bots obey. After deploying, watch your access logs for a week. Disallowed agents should stop appearing on content paths (a robots.txt fetch itself is fine and expected).
  2. Authenticate the user agents you do see. OpenAI and Anthropic publish official crawler IP ranges as JSON. Any “GPTBot” arriving from a residential proxy is a scraper wearing a costume — robots.txt was never going to stop it, and it belongs in your firewall rules instead. Refusing compliant bots and repelling hostile ones are different jobs, and the second one belongs at the edge — see our guide to Cloudflare WAF rules and edge caching.
  3. Watch for new agents quarterly. The user-agent roster changes several times a year. A quarterly log scan for unrecognized bot-like agents, plus a check of each operator’s crawler documentation page, keeps the file current.

Beyond Permission: Make the Allowed Fetches Count

Once you have decided who gets in, two adjacent moves multiply the value of every permitted crawl. First, performance: allowed bots still abandon slow pages, and the timing budgets involved overlap almost exactly with the ones covered in our companion piece on Core Web Vitals and mobile page speed. Second, format: pointing agents at a curated plain-text index via the llms.txt standard hands them your best content pre-flattened, instead of leaving them to infer structure from your templates.

Ship It This Week

Pull your current robots.txt, diff it against the agent table above, and write an explicit rule for every row — silence is a policy too, just an accidental one. Then verify in logs after seven days. The whole exercise costs an hour and settles a question most competitors are still answering by default.

Run this article on your site

Rewrite my robots.txt for the AI agent era. Ask me three policy questions first: do I want my content used for LLM training, do I want to be indexed by AI answer engines, and do I want to allow user-triggered page fetches. Then generate a complete robots.txt with separate, correctly spelled User-agent blocks for GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot, PerplexityBot, Google-Extended, and CCBot implementing my answers, keeping normal search engines fully allowed, and add a comment above each block explaining what that agent does.

Paste into Claude Code, ChatGPT, Cursor or Gemini. It executes the steps above against your own site.

Frequently Asked Questions

Should I block GPTBot from my website?

Only if you object to your content being used for model training. Blocking GPTBot does not remove you from ChatGPT Search — that runs on OAI-SearchBot and Bing's index — so publishers who want ChatGPT citations but not training ingestion should block GPTBot while explicitly allowing OAI-SearchBot.

What is the difference between GPTBot, OAI-SearchBot, and ChatGPT-User?

GPTBot collects training data for OpenAI models, OAI-SearchBot builds the index behind ChatGPT Search, and ChatGPT-User fetches a specific page when a human asks ChatGPT to open it. They are controlled by separate robots.txt user-agent blocks, so you can set a different policy for each function.

Does Google-Extended block Googlebot or hurt my Google rankings?

No. Google-Extended is a control token, not a crawler — disallowing it only opts your content out of Gemini model training and grounding. Googlebot continues crawling and your Search rankings and AI Overviews eligibility are unaffected.

Do AI companies actually respect robots.txt?

The major operators — OpenAI, Anthropic, Google, and Perplexity's indexing crawler — publicly document compliance and, in MarketLens log reviews, observably honor Disallow rules. User-triggered fetchers may still open a URL a human explicitly pasted, and bad-faith scrapers ignore robots.txt entirely, which is why enforcement beyond robots.txt happens at the WAF layer.

How do I verify a crawler claiming to be ClaudeBot is genuine?

Check the source IP against the operator's published ranges rather than trusting the user-agent header. OpenAI and Anthropic publish their crawler IP blocks as JSON files, and any request presenting an AI user agent from outside those ranges should be treated as a spoofed scraper.

Continue the track — Technical AI Infrastructure