robots.txt for AI Crawlers: Every Rule That Matters

One plain text file decides which AI engines can touch your site. The 30-second syntax refresher, three copy-paste policies, and the mistakes that break everything.

Updated September 19, 2026 ยท 9 min read ยท part of the GEO guides

The 30-second refresher

robots.txt is a plain text file at the root of your domain โ€” https://example.com/robots.txt โ€” that tells crawlers which paths they may fetch. The syntax fits in four lines of theory: a User-agent line opens a rule group, Disallow and Allow lines define paths, and each crawler obeys the single most specific group whose name matches its user agent. Disallow: / blocks the entire site, an empty Disallow value allows everything, and paths are case-sensitive on most servers. That is ninety percent of the syntax. The rest is knowing which bots exist and what each one is worth to you.

Two rules worth knowing before you write anything. A Sitemap: line tells every compliant crawler where your sitemap lives, independent of group order. And a crawler matches exactly one group โ€” the best-fitting one โ€” so a broad blanket group never silently stacks on top of a specific allow group. Each bot reads one group and one group only.

Who wants in: the three categories

CategoryWhoWhat blocking costs you
Training botsGPTBot, ClaudeBot, Bytespider, CCBot, Google-Extended, Applebot-ExtendedYour content stops shaping future models. The loss is gradual and invisible: engines know and recommend you less over time.
Search-index botsOAI-SearchBot, PerplexityBotThe immediate one. These bots feed live answers โ€” block them and AI engines stop citing and linking to you today.
User-triggered fetchersChatGPT-UserReal-time reads when a user explicitly asks the assistant to open your page. Low volume, high intent.

The practical takeaway: most sites want categories two and three in, and decide consciously about category one. Blocking everything because a training-panic headline told you to also blocks the citations that send referral traffic. The crawler mechanics guide explains what each bot does with your content, and the directory lists every bot worth knowing.

Three policies you can paste today

Policy 1 โ€” block training crawlers, keep AI search visibility. The balanced default for most businesses:

User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Bytespider
User-agent: CCBot
User-agent: Google-Extended
User-agent: Applebot-Extended
Disallow: /

User-agent: OAI-SearchBot
User-agent: ChatGPT-User
User-agent: PerplexityBot
Disallow:

Several User-agent lines in one group apply the rules to all of them at once โ€” no need to repeat the Disallow per bot. The empty Disallow in the second group explicitly allows those bots the whole site.

Policy 2 โ€” allow everything. Maximum visibility, training included:

User-agent: *
Disallow:

An empty Disallow means fetch anything. Note that this is also exactly what happens when you have no robots.txt at all, and that removing a disallow rule takes effect only after each engine's next crawl โ€” not the second you save the file.

Policy 3 โ€” block all AI crawlers. For private, paywalled or legally sensitive content:

User-agent: GPTBot
User-agent: OAI-SearchBot
User-agent: ChatGPT-User
User-agent: ClaudeBot
User-agent: PerplexityBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: Bytespider
User-agent: CCBot
Disallow: /

Honest warning: this makes you invisible in AI answers, not merely untrained-on. And because Bytespider has a documented history of ignoring robots.txt, a file-only block is not enforcement โ€” pair it with server-level user-agent or network rules if blocking genuinely matters.

robots.txt is the floor, not the ceiling. It can only forbid. To actively help AI engines understand your site โ€” recommended pages, a map of your content, contact points โ€” add an llms.txt file alongside it.

Syntax mistakes that silently break your rules

The cost of blocking, honestly

A word on scope first: robots.txt lives per host. A file on your main domain says nothing about a docs subdomain or an old staging domain, and the only supported wildcards are the asterisk for any character sequence and the dollar sign for end-of-URL โ€” enough for patterns like blocking every query URL, but everything fancier belongs at the server layer.

Blocking is not free, and neither is allowing. Block the search-index bots and you lose the citation channel that links back with real referral traffic โ€” a loss you can measure within weeks using the AI visibility metrics. Allow the training bots and your best content helps a model answer questions about your domain without you being named. There is no universally correct policy; there is only the one that matches what your content is worth and how you make money.

So decide per category, write the file, then verify it says what you think it says. Paste your robots.txt into the free Auditor for a per-bot verdict, or use the generator to produce a correct file from checkboxes instead of memorizing syntax. Both take under a minute and catch every silent mistake listed above.

Frequently asked questions

Does blocking AI crawlers in robots.txt legally bind anyone?

robots.txt is a convention, not a law. Reputable operators โ€” OpenAI, Anthropic, Google, Apple, Perplexity โ€” honor it as published policy. Others ignore it. For real enforcement you need server-level blocks: user-agent filtering, IP rules or WAF bot protection.

Should I set Crawl-delay for AI bots?

You can, but expect little. Google ignores the directive outright, and several AI bots publish no support for it. If crawler load is hurting your server, throttle at the server or CDN level โ€” that works against every client, compliant or not.

Does robots.txt affect Google AI Overviews?

Not through Google-Extended. AI Overviews build on Google's normal search indexing, so blocking Googlebot would remove you from AI Overviews โ€” and from search itself. Google-Extended only governs Gemini's training access. Three different decisions, three different controls.

Do I still need a sitemap if AI crawlers read robots.txt?

Yes. Declare your sitemap in robots.txt with a Sitemap: line. Search-index and training bots use sitemaps as a discovery shortcut for new and updated pages, which shortens the time between publishing and becoming citable.

Keep reading

See what AI engines can see on your site

Audit your robots.txt against 61 AI crawlers in seconds โ€” free, no signup, runs entirely in your browser.