AI Visibility Tracking ToolFree checker

How to Test robots.txt Rules for Each AI Bot

99Visibility Research · Updated October 21, 2026 · 8 min read

Short answer

To test robots.txt for AI bots, resolve the rules separately for each named user agent. First find the group the crawler obeys: its own named group, or the * group if none matches. Then apply the longest matching Allow or Disallow path to each URL you care about. A clean result proves permission only. A firewall or CDN can still block the bot, so run a reachability test next.

Key takeaways

  • A crawler obeys only its most specific matching group, so a named GPTBot group ignores everything in the * group.
  • Inside a group, the longest matching path wins, and a tie between Allow and Disallow should resolve to Allow under RFC 9309.
  • Training and search bots are separate tokens: blocking GPTBot does not remove you from ChatGPT search, but blocking OAI-SearchBot does.
  • A robots.txt pass is necessary but not sufficient, because a firewall or CDN can return 403 to a bot your file allows.
  • Retest after every robots.txt, CDN or firewall change, and on a fixed monthly schedule.

Why you test per bot, not per file

Every AI company runs several crawlers, and each one reads robots.txt for its own token. A rule written for one bot says nothing about the others. OpenAI states it plainly on its crawler page: "Each setting is independent of the others."

That independence is why a single pass or fail for the whole file is useless. You need one answer per user agent, matched to what that bot actually does. As of October 2026, the tokens that matter most are:

Token What a Disallow controls
OAI-SearchBot Whether pages appear in ChatGPT search answers
GPTBot Training use only, no search effect documented
Claude-SearchBot / ClaudeBot Claude search quality / training
PerplexityBot Perplexity's search index
Google-Extended Gemini Apps training and grounding, not Google Search
Googlebot All Google Search surfaces, including AI Overviews and AI Mode
Meta-WebIndexer Meta AI search and citation
bingbot Bing index, which backs Copilot

There is no robots.txt token for AI Overviews or AI Mode. Googlebot is the control there. User-triggered fetchers also behave differently: OpenAI says robots.txt "may not apply" to ChatGPT-User, and Perplexity says Perplexity-User "generally ignores robots.txt rules." Our per-bot guide to robots.txt for AI crawlers covers each token in more depth.

How a crawler picks its group under RFC 9309

RFC 9309, the Robots Exclusion Protocol standard, sets the order of operations. Get this step wrong and every later check is wrong too.

  • The crawler compares its product token with each User-agent line, case-insensitively.
  • If one or more groups name it, it uses those groups and merges them if there are several.
  • Only if no group names it does it fall back to the User-agent: * group.
  • It never combines its named group with the * group.

That last rule causes most surprises. Take this file:

User-agent: *
Disallow: /admin/

User-agent: GPTBot
Disallow: /private/

GPTBot may crawl /admin/, because it reads only its own group. OAI-SearchBot has no group, so it falls back to * and stays out of /admin/. If you want a rule to apply to a named bot, repeat it inside that bot's group.

The * is special only when it stands alone on the User-agent line. A line like User-agent: GPT* is not a wildcard under the standard, so do not rely on it. Write each token in full. Rules also apply per host, so each subdomain needs its own robots.txt.

How Allow and Disallow resolve inside a group

Once you know the group, test each URL against its rules. RFC 9309 says the most specific match wins, meaning the rule with the longest matching path. If an Allow and a Disallow match with equal length, crawlers should use Allow. Our explainer on how Allow and Disallow interact walks through more cases.

Wildcard and path traps

  • Disallow: /blog blocks /blog, /blog/ and /blog-archive, because matching is a prefix match.
  • Disallow: /blog/ does not block the bare /blog URL.
  • * in a path matches any run of characters, so Disallow: /*? blocks every URL with a query string.
  • $ anchors the end, so Disallow: /*.pdf$ blocks PDFs but not /file.pdf?v=2.
  • An empty Disallow: line allows everything for that group.
  • Paths are case-sensitive: /Pricing and /pricing are different rules.

File size is a quieter trap. The standard only requires crawlers to parse at least 500 kibibytes, so rules past that point may never be read. See whether a very large robots.txt can break AI crawler rules.

Step-by-step: test each AI bot

  1. Fetch https://yourdomain.com/robots.txt directly and note the HTTP status code. Repeat for every subdomain that serves content.
  2. List the URLs that carry your load-bearing facts: homepage, pricing, product pages, docs, about page.
  3. For each token in the table above, find its group: a named group if one exists, otherwise *.
  4. Merge any duplicate groups for the same token.
  5. For each URL, find every Allow and Disallow rule in that group that matches. Keep the longest. Break ties toward Allow.
  6. Write down the verdict per bot per URL in a simple grid.
  7. Compare each verdict with your intent. Ask whether you meant to block training, search, or both.
  8. Fix mismatches, redeploy, and rerun steps 1 to 6.
  9. Run a reachability test for every bot your file allows (see below).

If you would rather not resolve rules by hand, the free robots.txt checker for AI crawlers does steps 3 to 6 for you.

Checklist before you sign off

  • robots.txt returns 200 on every host, not a redirect loop, 5xx or timeout.
  • OAI-SearchBot, Claude-SearchBot, PerplexityBot, Meta-WebIndexer, Googlebot and bingbot resolve to the access you intend.
  • Training bots (GPTBot, ClaudeBot, Google-Extended) resolve to the policy you chose, separately from search bots.
  • No blanket User-agent: * / Disallow: / sits above an Allow you assumed would apply.
  • Rules from the * group that you need for named bots are repeated inside those groups.
  • Path rules use the intended trailing slash, case and $ anchor.
  • The file is well under 500 KiB.
  • Pricing and product URLs are allowed for every search bot you want.
  • A reachability test confirms each allowed bot actually receives a 200.

What good and bad results look like

Good

Each search bot resolves to Allow on your key URLs. Training bots resolve to whatever you decided on purpose. The file returns 200 and parses cleanly. That buys eligibility, not citations: allowing a bot lets it fetch your pages, and nothing more is promised.

Bad

  • A blanket AI block. A file that disallows every AI token at once often removes ChatGPT search eligibility by accident, because it catches OAI-SearchBot along with GPTBot.
  • A named group that drops your * rules. You added a group for one bot and lost protections you thought applied.
  • A 5xx on robots.txt. Under RFC 9309, crawlers must treat an unreachable file as a full disallow.
  • A 4xx on robots.txt. Crawlers may then treat the site as fully allowed, which may not be what you want either.
  • A rule past the parse limit. It looks correct in the file and has no effect.

Fix the bad results first, then move on to network access.

Pair it with a reachability test

robots.txt is a request, not a gate. Your firewall, CDN or bot-management settings decide what a crawler actually receives. A bot your file allows can still get a 403 or a CAPTCHA, and that failure is silent.

OpenAI's help center makes the point directly: to be eligible, "allow OAI-Searchbot to crawl the site and confirm that the website host or content delivery network allows traffic from OpenAI's published searchbot IP addresses." The word is and, not or. OpenAI publishes those ranges at openai.com/searchbot.json. Anthropic also warns that IP blocking can stop it reading your robots.txt at all.

CDN defaults can change without you editing anything. Since 2026-09-15, Cloudflare blocks Training and Agent crawlers by default on ad-displaying pages for new domains, new sites on existing accounts, and existing free-tier customers.

So after the file passes:

How often to repeat it

Rerun the full test whenever one of these changes:

  • robots.txt itself, including CMS or plugin updates that rewrite it.
  • Your CDN, WAF or bot-management rules, or your hosting plan.
  • A new subdomain, site section or migration.
  • A vendor announces a new crawler token or changes what an existing one does.

Outside those events, run it monthly. Crawlers cache robots.txt, and RFC 9309 says they should not use a cached copy for more than 24 hours unless the file is unreachable. Expect fixes to take effect within about a day, then confirm with a fresh reachability test. If you need a clean starting point, adapt the robots.txt template for AI search and training bots.

Frequently asked questions

Does allowing a bot in robots.txt get my pages cited in AI answers?

No. Allowing a bot makes your pages eligible to be fetched and indexed by that bot. It does not guarantee retrieval for any query, and it does not guarantee a citation. The one first-party statement linking access to citation comes from Meta: "Allowing Meta-WebIndexer in your robots.txt file helps us cite and link to your content in Meta AI's responses." No other vendor makes that claim. Treat permission as removing a block, not adding a boost.

If I block GPTBot, will I disappear from ChatGPT search?

No. GPTBot governs training use only. ChatGPT search uses OAI-SearchBot, and OpenAI says each setting is independent of the others. You can disallow GPTBot to opt out of training and still allow OAI-SearchBot to stay eligible for ChatGPT search answers. The reverse also holds: allowing GPTBot does nothing documented for search visibility. Test the two tokens separately and set each one on purpose.

Can I block Google AI Overviews with robots.txt?

Not separately. There is no robots.txt token for AI Overviews or AI Mode. Googlebot controls all Google Search surfaces, so blocking it removes you from regular search too. Google-Extended controls Gemini Apps training and grounding, and Google says it does not affect Search inclusion. For limiting how your content appears in AI features, Google documents page-level controls such as nosnippet, max-snippet and data-nosnippet instead.

Why does my named bot group ignore rules I set for all bots?

Because RFC 9309 tells a crawler to use only the most specific group that matches its token. Once a group names GPTBot, GPTBot stops reading the User-agent: * group entirely. Rules in the * group apply only to bots with no named group. If you want a shared rule, such as blocking /admin/, to cover a named bot, copy that rule into the named bot's group as well.

Do user-triggered fetchers like ChatGPT-User follow robots.txt?

Not reliably. As of October 2026, OpenAI says robots.txt rules may not apply to ChatGPT-User because a person initiates the fetch. Perplexity says Perplexity-User generally ignores robots.txt, and Meta documents that Meta-ExternalFetcher may bypass it. If you need to stop these fetchers, robots.txt alone will not do it. Controls at the firewall or CDN level are the only enforcement you hold.

Sources

  1. RFC 9309: Robots Exclusion Protocol
  2. Overview of OpenAI Crawlers
  3. Searching the web with ChatGPT
  4. Perplexity Crawlers - Perplexity
  5. Google's common crawlers
  6. Meta

This page is AI-assisted. It was written from a verified evidence base and checked against our editorial policy. Engine behaviour changes often; facts are as of October 21, 2026.

Keep reading