Framework How-To Guide aiknowledgesignal.io

How to Configure robots.txt for AI Crawlers

robots.txt is the first gate every AI crawler checks — get it right and your content is reachable; get it wrong and you are invisible to AI systems no matter how good your pages are.

Why it matters

Before an AI system can cite you, its crawler has to be allowed to fetch your pages. robots.txt — a single plain-text file at the root of your domain (/robots.txt) — is where you grant or deny that access. For a crawler that honours the file, blocking it here removes your content from that system's training and real-time retrieval; no amount of structured data or authority downstream can compensate for a closed gate. (For crawlers that ignore the file, see “Compliance is not universal” below — the file is not a universal off switch.)

The most common cause of zero AI visibility is not weak content — it is an accidental Disallow: / left over from a staging environment. For knowledge-asset publishers, the recommended posture is fully open: let the AI crawlers in, and declare your sitemap so they can discover everything worth citing.

What good looks like

A crawl-ready robots.txt permits the AI crawlers you care about and points them at your sitemap, with no sweeping disallow hiding your content:

Know your AI crawlers — training, search and user fetches are separate

Most AI operators now run more than one agent, and each one answers a different question. Decide your policy per job, not per company:

OperatorTrainingSearch / answer indexUser-initiated fetch
OpenAIGPTBotOAI-SearchBot (ChatGPT search)ChatGPT-User — OpenAI says robots.txt rules may not apply to user-initiated actions
AnthropicClaudeBotClaude-SearchBotClaude-User
Perplexity—PerplexityBotPerplexity-User
GoogleGoogle-Extended — a control token covering Gemini training and grounding, not a separate crawlerGooglebot — Search, including AI Overviews and AI Mode—
AppleApplebot-Extended (control token)Applebot—
MetaMeta-ExternalAgent—Meta-ExternalFetcher
Common CrawlCCBot — open dataset widely reused for training——
ByteDanceBytespider — has a reported history of disregarding robots.txt——

Vendors add and rename agents. Check each operator’s current crawler page before you rely on this table — OpenAI and Anthropic both publish theirs (linked in the evidence box above).

The decision most sites actually want If you want to be cited in AI answers but are unsure about training, the search and user agents are the ones that matter for citation. A site can block GPTBot and ClaudeBot (training) while allowing OAI-SearchBot, Claude-SearchBot, PerplexityBot and the -User agents (citation). The reverse mistake — blocking a search agent while meaning to block training — silently removes you from that assistant’s answers.
Google: there is no AI-Overviews-only opt-out AI Overviews and AI Mode use the normal Google Search index and Googlebot. Google-Extended does not remove you from them. The only controls are the ordinary Search ones: blocking Googlebot (which removes you from Search entirely) or snippet controls such as nosnippet and max-snippet. For Google, optimise how you are cited rather than trying to gate access.
Cloudflare sites: check what your CDN publishes for you Cloudflare can serve a managed robots.txt on your behalf and offers one-click blocking of AI crawlers, so a site can be blocking AI agents without anyone having edited the file. Its managed file also adds Content Signals — a preference line such as Content-Signal: search=yes, ai-train=no (a third value, ai-input, covers use as live answer input). Content Signals are a declaration of preference, not a technical block, and no major AI vendor has committed to honouring them. Fetch your live /robots.txt and read what is actually served.

Source: Cloudflare — Content Signals Policy.
Compliance is not universal [Single study] robots.txt only binds crawlers that choose to follow it. Goodie’s 2026 publisher study reports that several high-volume AI surfaces (it names Grok and DeepSeek) offer no functional opt-out. Treat a Disallow for those as a request, and rely on making your content quotable and correctly attributed (Phases 2–5).

Source: Goodie — AI Citations & News Publishers: 2026 Study.
Bot detection is a stronger gate than robots.txt A WAF, CAPTCHA or bot-management rule blocks a crawler before it ever reads robots.txt. If you want AI citation, verify these layers are not silently turning away the agents you allow (Phase 1.4). If you want to restrict access, network-level controls are enforceable in a way a Disallow line is not.
A shared training opt-out signal is coming — map your rules now [Announced, not yet live] OpenAI says it will honour a common robots.txt signal from the IETF AI Preferences working group, so a single rule could express a training opt-out to every participating provider instead of one rule per crawler. Nothing changes yet: OpenAI says its existing per-crawler controls stay in effect, and the syntax and rollout date are not confirmed. Do the preparation that is useful either way — list every training-exclusion rule in your file, note the provider and agent it was written for, and flag any rule that blocks a search or user agent when you only meant to block training. Draft the mapping, not the replacement: don’t rewrite the file around a guessed syntax. The signal covers training preferences only; search and user agents keep their own rules.

Source: OpenAI — Helping websites express AI training preferences (30 Oct 2026).

Step by step

  1. Decide your crawler policy — per job Decide separately for training, search/answer indexing and user-initiated fetches (table above). For knowledge-asset publishers the recommended posture is fully open. If you opt out of training, keep the search and user agents allowed, or you also opt out of being cited. Then rule out the two accidental postures: a staging Disallow: / that survived launch, and habitual blocks of /blog or /docs.
  2. Write the allow rules For the open posture, a single User-agent: * / Allow: / covers everything. For a targeted posture, write a group per agent. Two parsing rules catch people out (RFC 9309): consecutive User-agent lines share one group of rules, and an agent that has its own group ignores the * group entirely — so repeat any private-path Disallow lines inside each named group. Agent names match case-insensitively.
  3. Declare your sitemap Add a Sitemap: line with the absolute URL of your XML sitemap. This is how crawlers discover pages and understand your structure — it pairs directly with Phase 1.3 (llms.txt) and Phase 5.5 (sitemap + llms.txt cross-reference).
  4. Check for accidental blocks Read the file top to bottom and confirm there is no Disallow: / under User-agent: * (or under any AI user-agent) that you didn't intend. This single line is the most common reason a site is absent from AI answers.
  5. Verify against the live site Fetch the live file (curl https://yourdomain.com/robots.txt), confirm it returns 200 and contains the rules you expect — not a CDN-managed version you didn’t write. Then check the network layer: a curl --user-agent "GPTBot" test only shows how your WAF treats that string. Real crawlers are verified by IP, so a spoofed test can be blocked while the real bot is admitted, or the reverse. Confirm in your server logs or CDN bot analytics that requests from the vendors’ published IP ranges receive 200 (Phase 1.4).

Worked examples

1 Fully open — recommended for GEO

The simplest correct configuration for a knowledge-asset publisher: every crawler is welcome, and the sitemap is declared so they find everything.

# Fully open (recommended for GEO)
User-agent: *
Allow: /

Sitemap: https://example.com/sitemap.xml
2 Cited, but not trained on — with a private block

A site that wants to appear in AI answers but opts out of model training. Search and user agents are allowed; training agents are blocked. Because a named group ignores the * group, the private paths are repeated in the shared group of allowed agents.

# Training opt-out
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Applebot-Extended
User-agent: CCBot
Disallow: /
# Google-Extended also controls grounding in Gemini Apps — add it
# here only if you accept losing Gemini citations.

# Search + user-initiated agents: allowed (private paths repeated)
User-agent: OAI-SearchBot
User-agent: ChatGPT-User
User-agent: Claude-SearchBot
User-agent: Claude-User
User-agent: PerplexityBot
User-agent: Perplexity-User
Allow: /
Disallow: /admin
Disallow: /internal

# Everyone else, including Googlebot (Search + AI Overviews)
User-agent: *
Disallow: /admin
Disallow: /internal

Sitemap: https://example.com/sitemap.xml
3 Before / after: the accidental staging block

The same site, one line different. The "before" is the single most common reason a site is missing from AI answers — a blanket disallow that survived a launch.

Before User-agent: * / Disallow: /. Every crawler is turned away at the door. The site is invisible to AI training and retrieval, regardless of content quality. No sitemap declared.
After User-agent: * / Allow: / with Sitemap: declared. Crawlers are admitted and pointed at the full set of canonical pages. Visibility restored with a one-line change.

What robots.txt can and can't do

robots.txt is a published request, honoured by well-behaved crawlers — OpenAI's GPTBot, for example, obeys the directives at /robots.txt. It is not an enforcement mechanism. Three limits are worth stating plainly to clients:

So treat robots.txt as the gate you must open to be eligible, and treat any opt-out as a best-effort signal rather than a hard wall.

Common mistakes

MistakeFix
Leftover Disallow: / from stagingRemove it — this single line makes the whole site invisible to AI crawlers.
Disallowing /blog or /docs "to be safe"These are usually your best knowledge assets; allow them explicitly.
No Sitemap: lineDeclare the absolute sitemap URL so crawlers discover and prioritise canonical pages.
Relative sitemap URLUse the full https:// URL — relative paths are not valid in robots.txt.
Blocked at the WAF/CDN insteadCheck server logs or CDN bot analytics for the vendors’ real IP ranges, not just a spoofed curl; allow the agents you permit at the network layer too (Phase 1.4).
Assuming robots.txt guarantees opt-outIt's a request honoured by compliant crawlers; treat exclusion as probabilistic (see the limits above).
Blocking GPTBot to "stay out of ChatGPT"GPTBot is training only. ChatGPT search uses OAI-SearchBot; decide training and search separately.
Expecting Google-Extended to remove you from AI OverviewsIt doesn’t — AI Overviews and AI Mode use Googlebot. Use snippet controls, or accept citation and optimise for it.
Named group missing the private-path DisallowsAn agent with its own group ignores *; repeat private paths inside each named group.
Undocumented legacy training blocksRecord which provider and agent each training rule targets. When the shared IETF training signal ships, migration is then a mapping exercise, not a rewrite.

Limits of this advice

Checklist

  • Live /robots.txt returns 200 and is the file you wrote (not an unexpected CDN-managed version)
  • No unintended Disallow: / under User-agent: * or any AI user-agent
  • Training, search and user-fetch agents decided separately (e.g. GPTBot vs OAI-SearchBot vs ChatGPT-User)
  • Search and user agents allowed wherever you want to be cited
  • Private-path Disallows repeated inside every named group
  • Sitemap: declared with an absolute URL
  • Server logs / CDN analytics show real AI-crawler IPs receiving 200 (Phase 1.4)
  • Content Signals line (if any) matches your intended policy
  • Every training-exclusion rule is mapped to the provider and agent it was written for