Should you block AI crawlers?

Sort AI crawlers by job, write a robots.txt that matches, separate GEO evidence from hype, and keep your pages from steering AI agents.
Part 4 of 4 in the "Are you sure your website is safe?" series
AI systems copy a website to train models, index it for AI answers, and fetch it live for one user, so make a separate decision for each job and back robots.txt with a firewall rule for bots that ignore it. The newer risk is that any page an AI agent reads can carry instructions to that agent.
Three jobs AI crawlers do on your site
Your robots.txt was probably written for Googlebot. Now OpenAI, Anthropic, Google and Perplexity each run several bots: GPTBot, ClaudeBot, OAI-SearchBot, PerplexityBot, ChatGPT-User and more. The natural move is to block or allow by company. But OpenAI says it plainly: "Each setting is independent of the others" (OpenAI crawlers).
Think of a small bookshop. One visitor photocopies every book to write their own. A second writes a city guide, lists the shop, and sends readers its way. A third is a courier sent by one customer to collect one book.
You would treat these three people differently, and bots split the same way. The analogy has a limit: some AI guides send back almost no readers, as the numbers below show.
Training crawlers copy content for future models
GPTBot crawls content that "may be used in training" OpenAI's models (OpenAI crawlers). ClaudeBot collects training data for Anthropic (Anthropic crawler FAQ). Google uses a robots.txt token instead of a separate bot: Google-Extended controls whether crawled content may train future Gemini models and ground Gemini answers, and it "does not impact a site's inclusion in Google Search" (Google common crawlers). CCBot collects pages for Common Crawl's open web archive.
Grounding — feeding retrieved web pages to an AI model while it answers, so the answer can draw on and cite them.
These are the photocopiers, and site owners treat them that way: GPTBot, ClaudeBot and CCBot drew the most full disallow rules in 2025 (Cloudflare Radar 2025).
AI search crawlers index pages for answers
OAI-SearchBot surfaces sites in ChatGPT search, and a site that opts out "will not be shown in ChatGPT search answers" (OpenAI crawlers). Claude-SearchBot crawls to improve Claude's search results (Anthropic crawler FAQ). PerplexityBot is "designed to surface and link websites in search results on Perplexity" and is "not used to crawl content for AI foundation models" (Perplexity crawlers).
Google's AI Overviews and AI Mode use plain Googlebot and snippet controls such as nosnippet (Google AI features). These crawlers are the guide writers. Block one and you leave its guide.
User-triggered fetchers act for one person
ChatGPT-User, Claude-User and Perplexity-User fetch a page because a person asked their assistant to read it. OpenAI says robots.txt rules "may not apply" to these user actions. Perplexity says its user fetcher "generally ignores robots.txt rules" because a user requested the fetch (Perplexity crawlers). These are the couriers. Treat them like a browser.
What AI crawler traffic costs and returns
AI bots now crawl almost as much as Google: Cloudflare found they made up an average of 4.2% of HTML requests in 2025, against 4.5% for Googlebot (Cloudflare Radar 2025). The traffic they send back is much smaller.
Crawl-to-refer ratio — the number of pages a company's bots fetch for each visitor its products send back to the site.
Cloudflare's review (Cloudflare Radar 2025) reports crawl-to-refer ratios of as much as 500,000:1 for Anthropic and 3,700:1 for OpenAI (in March), while Perplexity generally stayed below 400:1. User-action crawling, the courier job, grew more than 15 times in 2025.

Example: a 3,700:1 crawl-to-refer ratio on a small blog
Take a blog whose pages one AI company fetches 37,000 times in a month. At 3,700:1, that buys about 10 visits. At 400:1, about 90. At 500,000:1, none. Perplexity has the lowest ratio, and PerplexityBot does no training crawls. So the crawl that sends readers back is AI search. Blocking training costs almost no visitors; blocking AI search cuts the crawl that sends them.
No public data shows what a small site gains by allowing these bots. The site in this series had 3 Google clicks in 28 days, far too few to measure an AI effect. Set the rule by job now, and revisit when your logs show referrals.
Default AI crawler blocking and pay per crawl
Your CDN (content delivery network) may have decided already. On 1 July 2025, Cloudflare began blocking AI crawlers by default on new domains and launched pay per crawl in private beta: per crawler, the owner picks Allow, Charge or Block, and a crawler that shows no intent to pay gets 402 Payment Required (Cloudflare pay per crawl). Check that setting before you edit robots.txt.
Write robots.txt by job, then enforce it
Set one rule per job:
- Training crawlers — opt out if your content is your product (paid articles, course material, a recipe archive). Google-Extended has no effect on Search, so this costs nothing there.
- AI search crawlers — allow them if you want citations in AI answers. Blocking them removes you from those answers.
- User-triggered fetchers — leave them alone. They act for a person who chose to read your page.
Here is that policy as a plain file, and as the Next.js app/robots.ts that generates it.

User-agent: GPTBot
User-agent: ClaudeBot
User-agent: CCBot
User-agent: Google-Extended
Disallow: /
User-agent: OAI-SearchBot
User-agent: Claude-SearchBot
User-agent: PerplexityBot
Allow: /
Disallow: /api/
User-agent: *
Allow: /
Disallow: /api/
Sitemap: https://www.example.com/sitemap.xmlimport type { MetadataRoute } from 'next';
const trainingBots = ['GPTBot', 'ClaudeBot', 'CCBot', 'Google-Extended'];
const aiSearchBots = ['OAI-SearchBot', 'Claude-SearchBot', 'PerplexityBot'];
export default function robots(): MetadataRoute.Robots {
return {
rules: [
{ userAgent: trainingBots, disallow: '/' },
{ userAgent: aiSearchBots, allow: '/', disallow: '/api/' },
{ userAgent: '*', allow: '/', disallow: '/api/' },
],
sitemap: 'https://www.example.com/sitemap.xml',
};
}The file has two limits. A disallowed page "can still be indexed if linked to from other sites", and "it's up to the crawler to obey" the rules (Introduction to robots.txt). Would you know if your website was hacked? covers noindex and authentication for private pages. Bots that ignore the file need enforcement.
WAF — web application firewall, a filter in front of your site that blocks or challenges requests by rules such as user agent, IP (internet protocol) address or signature.
Web Bot Auth — a scheme in which a crawler signs each request so the site can verify which operator sent it.
Back the file up in three steps:
- Verify the bots you allow. A user agent name is easy to fake. Trust a bot's name only from the operator's published IP ranges (OpenAI publishes them, for example
openai.com/gptbot.json) or with a Web Bot Auth signature, which pay per crawl requires (Cloudflare pay per crawl). Skip this, and any scraper that calls itself OAI-SearchBot passes your allow rule. - Leave hidden crawlers to the CDN. Cloudflare reported Perplexity using undeclared crawlers to evade no-crawl directives (Cloudflare on stealth crawlers). That is a job for bot management, such as Cloudflare's default AI block.
- Write the robots.txt rule before any IP block. Anthropic warns that blocking its IP addresses "may not work correctly or persistently guarantee an opt-out", because the bot can then no longer read your robots.txt (Anthropic crawler FAQ). Don't IP-block a bot that already obeys the file.
When not to block AI search crawlers
A company site or a store that wants to be recommended should keep AI search bots open. A recipe archive's pages are the product, so block training and keep AI search open. A store's product page sells the item, so keep both open: every AI answer that cites it can send a buyer your way.
GEO: what the evidence supports
GEO — generative engine optimization, the practice of shaping content so that AI answer engines use and cite it.
The original GEO paper reports that its methods "can boost visibility by up to 40% in generative engine responses", with results that vary by domain (Aggarwal et al., GEO). It comes from a research benchmark, and your site will see its own number.
Google's guide is blunter. You "don't need to create new machine readable files, AI text files, markup, or Markdown to appear in Google Search", such files "will neither harm nor help", and optimizing for generative AI search is "still SEO" (Google AI optimization guide). It also warns about third-party "AEO" (answer engine optimization) and "GEO" services.
Bing uses the term itself and defines GEO as "content eligibility for grounding and reference in AI responses". Its opt-out is NOARCHIVE, which "prevents content from being used in Copilot responses and grounding results" (Bing Webmaster Guidelines). IndexNow, covered in Part 3, gets changed pages into Bing's index sooner.
Then there is llms.txt, a Markdown index of a site written for language models. Its v2 page says "thousands of sites publish an llms.txt file" and that Chrome's Lighthouse checks for one (llms.txt). Google Search says such files make no difference. Both statements hold. llms.txt is cheap documentation for agents and does nothing for Google rankings.
If you doubt Google here, you have a point: agencies sell GEO packages, and a peer-reviewed paper measured gains. Content changes can move AI visibility. But Google says the work is SEO, and the parts you control are the ones you already know: pages crawlers can read, clear headings, specific facts with sources, and fast load times. Spend the GEO budget there.
Agent readiness for a content site
Agents now fill forms and call tools, but few sites are built for them. Cloudflare's Agent Readiness scan of the top 200,000 domains found that 78% have a robots.txt, 4% declare AI usage preferences, 3.9% can return a Markdown version of a page on request, and fewer than 15 publish MCP server cards with API (application programming interface) catalogs (Cloudflare Agent Readiness).
MCP — Model Context Protocol, an open standard that lets an AI application discover and call tools and data exposed by a server.
Three newer projects target agents directly:
- WebMCP — a draft from a W3C (World Wide Web Consortium) community group that "enables web applications to provide JavaScript-based tools to AI agents" (WebMCP draft).
- Lighthouse agentic browsing — a Lighthouse category (Chrome 150 or later) that audits WebMCP tools, the accessibility tree, layout shift and llms.txt (Lighthouse agentic browsing).
- NLWeb — a Microsoft project built on Schema.org markup and RSS (Really Simple Syndication) feeds, where "Every NLWeb instance is also a Model Context Protocol (MCP) server" (Microsoft NLWeb).
Accessibility tree — the structure of names, roles and labels that a browser builds from your HTML for screen readers, and that agents now read too.
For a blog or a company site, agent readiness mostly means good HTML, a complete accessibility tree and a layout that does not jump. These help a screen-reader user and an agent alike, and the site in this series already scored 100 for accessibility in Lighthouse.
Tools belong only where a person would act, such as a checkout or a booking form, and there the agent should show its plan and wait for approval, as When the interface starts with intent argues.
When not to add agent tools
Prompt injection — text written to make an AI model follow the attacker's instructions instead of its user's.
Don't add WebMCP tools to a site that only publishes articles. Each tool is something an agent can be tricked into calling, and the WebMCP draft itself lists tool-description poisoning and output injection as prompt injection risks.
Web content that attacks AI agents
LLM — large language model, the kind of model behind ChatGPT, Claude and Gemini.
OWASP — Open Worldwide Application Security Project, a nonprofit that publishes widely used lists of security risks.
OWASP ranks prompt injection first in its Top 10 for LLM applications. Indirect prompt injection happens "when an LLM accepts input from external sources, such as websites or files", and the payload does "not need to be human-visible/readable" (OWASP LLM01:2025).
In 2025, Brave researchers hid instructions behind a spoiler tag in a Reddit comment. When a user asked Perplexity's Comet browser to summarize the page, the agent followed the hidden text: it fetched the user's email address and a one-time password from their Gmail, then sent both to the attacker.
The agent could not "distinguish between the user's instructions and website content" (Brave on Comet). Reddit was never hacked. The comment was ordinary user content.

How prompt injection fails in prod for site owners
Your site can end up in a story like that in three ways:
- A hacked site. The access that plants cloaked spam pages (Part 3) can also plant instructions aimed at agents. Bing lists "Prompt Injection and AI Manipulation" with penalties of "reduced ranking, suppressed grounding visibility, or delisting from the Bing index" (Bing Webmaster Guidelines), so the owner pays for an attack aimed at someone else.
- User content. Comments, reviews and uploaded files can carry an injection with no hack at all, as the Reddit comment did.
- Your own AI feature. A chat widget that reads comments and can also send email gives an injected comment a way to act.
In practice: reduce prompt injection risk
Audit yourself with four questions:
- Does content review check for text a visitor cannot see?
- Is user HTML sanitized before you store or render it?
- Does each on-site AI feature have only the tools its job needs, with a person approving anything that sends, pays or deletes? (OWASP lists both among its mitigations.)
- Is web or user content marked as untrusted before it reaches the model?
A "no" to any of these leaves a comment or review free to carry instructions that a visitor's agent, or your own widget, can follow.
The AI-assisted review behind this series
The security findings in this series came from one review. An AI coding agent with a security brief checked the running site: it searched the deployed JavaScript, called the CMS (content management system) API with the token it found, requested encoded paths, and read the DNS (domain name system) records.
That surfaced the preview token in the public bundle, the encoded-path bypass, the webhook secret compared with !==, the auto-merge gate that trusted the wrong field, and the missing SPF (Sender Policy Framework) record fixed in Are you sure your website is safe?. SonarCloud, CodeQL, secret scanning and pnpm audit stayed green throughout (Is your API key in your JavaScript bundle? explains why).
The agent got one thing wrong. An early check searched the deployed chunks for one specific pattern and reported "no token". The search was too narrow. Its review of the source found the token anyway, and a final check compared the bundle against the real value without printing it.
Treat an AI reviewer's "clean" as a claim to verify, the same way you treat a scanner's green. Harness engineering proves your AI works covers how to measure that.
The agent also worked inside limits it could not lift:
- No secrets in the open — it could not type a token into a browser field, copy it to the clipboard, or pass it through a tool call. To rotate the token, it wrote the value to a temporary file only the owner could read (permission
600) and piped it intogh secret setand the hosting command-line tool. - No DNS edits — when the domain needed SPF and DMARC (Domain-based Message Authentication, Reporting and Conformance) records, the owner changed them at the registrar.
- No permanent deletes — anything destructive stayed with the owner.
The complete AI coding agent setup for Claude Code and Copilot shows how to build such limits with hooks.
This is the least-privilege rule OWASP gives for prompt injection, applied to your own reviewer. The agent read web pages, CMS responses and DNS records, and any of them could have carried instructions. If one had, the damage would have been limited to what the agent could touch: it could not handle the token in the open, edit DNS, or delete anything.
Without those limits, an injected instruction acts with every privilege the agent holds, the way Comet used its user's open Gmail.
AI crawlers and agents
Four practices here are core. The rest (llms.txt, agent tools, pay per crawl) is optional.
Decide robots.txt per job
- Do — write separate rules for training crawlers, AI search crawlers and user-triggered fetchers, as in the robots.txt example above.
- Don't — blanket-block every AI bot to feel safe.
- If you skip it — the site drops out of AI search answers such as ChatGPT search (OpenAI crawlers).
Back robots.txt with verification
- Do — verify the bots you allow by published IP ranges or Web Bot Auth, and leave undeclared crawlers to your CDN's bot management.
- Don't — IP-block a bot that already obeys robots.txt.
- If you skip it — faked bot names pass your rules, and an IP block can stop a well-behaved bot from reading robots.txt (Anthropic crawler FAQ).
Treat every page as input to agents
- Do — check content for hidden text, sanitize user HTML, and give on-site AI features only the tools they need.
- Don't — connect a widget that reads comments to email, payments or deletes.
- If you skip it — a comment or review can carry instructions an agent follows (Brave on Comet), and Bing can demote or delist the site for AI manipulation (Bing Webmaster Guidelines).
Limit what an agent or one password can reach
- Do — let an AI agent review or operate the site only inside the limits above, and put two-factor authentication (2FA) on the code host, deploy host, CMS, Google and registrar accounts.
- Don't — hand an agent, or a single password, control of all of them.
- If you skip it — one injected instruction or one stolen password reaches every account it can use, and can undo every fix in this series.
Bots and agents read your live site, not the repository your scanners check. If you only watch the dashboards, the first person to find a gap will not be you. Put a check of the live site on the calendar, as regular as your releases.
The "Are you sure your website is safe?" series: Part 1 | Part 2 | Part 3


