Which AI crawlers should you allow or block in robots.txt?
How robots.txt works
robots.txt is a text file placed at the root of your domain. It holds groups of rules, and each group names a user-agent, which is the name a crawler announces itself with. Under each name you list paths to allow or disallow. A crawler that follows the standard reads its own group and skips the paths you have closed.
The file is a request, not a lock. Well-behaved crawlers respect it, but it does not stop a determined visitor or a bot that ignores it. Pages that need to stay private should sit behind a login or another real access control. A disallowed page can still appear in search results if other sites link to it.
Three kinds of AI crawler
Providers usually run different bots for different purposes, and the trade-off of blocking differs for each one. Read a provider’s crawler documentation to see which bot does what, because the names and roles change over time.
- Training crawlers collect content that may be used to train or improve models. Blocking one keeps future collection out of that purpose, though it does not remove content already collected.
- Search or retrieval crawlers index pages so that an assistant can find and cite them when it answers a question. Blocking one can reduce how often your pages appear as sources in that assistant’s answers.
- User-triggered fetchers load a page because a person asked the assistant to read a link. Providers differ on whether robots.txt applies to them, because a person triggered the request; OpenAI’s documentation, for example, says robots.txt rules may not apply to ChatGPT-User, so check each provider’s notes.
Check the current user-agent names before you write rules
Examples you may see include GPTBot, OAI-SearchBot and ChatGPT-User from OpenAI, and ClaudeBot, Claude-SearchBot and Claude-User from Anthropic. Google uses a separate robots.txt token, Google-Extended, that lets you manage whether content Google crawls may be used to train future Gemini models and to ground answers in Gemini Apps, and Google says it does not affect inclusion in Google Search. It is distinct from the Googlebot crawler that powers Google Search, and Google’s AI features in Search follow Google Search controls, so read Google’s documentation for what each token covers. Treat these as starting points only. Confirm each name and what it does in the provider’s own documentation before you rely on it.
Blocking Googlebot removes your pages from Google Search, which is a much larger decision than blocking an AI training bot. Be precise about which token you name in each rule.
The trade-off of blocking
Blocking is not free, and it is not always wise. Think about what each choice gives up before you change the file.
- Blocking training crawlers may suit a publisher whose content is its main asset, but it will not reverse past collection.
- Blocking search crawlers can make your pages less visible in AI answers that cite live sources, which is often the reason a business wants to be found in the first place.
- Blocking user-triggered fetchers, where a provider honours it, can frustrate a potential customer who has asked an assistant to read your pricing or product page.
- A marketing site with no sensitive content often gains more from open access and clear pages than from closing them.
A practical way to set the rules
Decide your goal for each kind of bot first, then write the rules to match. Keep the file short, and comment each group so a colleague can see why it exists.
- List every user-agent name you intend to allow or block, using each provider’s current documentation.
- Test the file with the robots report in Google Search Console, or with a robots.txt testing tool, before you publish it.
- Check your server logs for these user-agent names to confirm which bots actually visit.
- Review the file whenever a provider announces new bots or renames old ones.
Mistakes that cost the most
The costliest mistake is a wildcard rule that blocks every bot by accident, often left over from a staging site. Another is a disallow rule that closes a whole folder when you meant one page. A third is assuming robots.txt hides confidential content. It does not, and a bot that claims a provider’s name may not be genuine, so do not build security on user-agent names.
How Hundred Seas helps
Hundred Seas is a product studio in Taipei that builds web apps, internal tools and AI agents, and that does generative engine optimization (GEO) work. Crawler access is one of the first things we check in a GEO audit, because a page that the assistants cannot read cannot be cited. We write the rules against each provider’s current documentation and work in English, Traditional Chinese and Simplified Chinese.
We start with a scope step of about one week at a fixed price, ending in a written plan and a firm quote. The changes then ship in weekly releases, and a monthly run plan keeps the rules current as providers change their bots.
Questions
- Should I block all AI bots to protect my content?
- Not automatically. Blocking every bot is one choice among several. It can stop training collection, but it can also remove your pages from answers that cite live sources. Decide by type: training, search and user-triggered. For a marketing site without sensitive material, open access to search and user-triggered bots is often the better starting point.
- Will blocking GPTBot remove my pages from ChatGPT answers?
- Check the provider’s documentation before relying on this. GPTBot is named as a training crawler, and separate user-agents handle search and user-triggered fetching. Blocking one name does not necessarily change the others, and OpenAI’s documentation describes GPTBot as separate from OAI-SearchBot, which governs appearing in ChatGPT search. Confirm the current names and what each controls, then test the result in your logs.
- Does robots.txt stop people from reading my private pages?
- No. robots.txt is a request that well-behaved crawlers honour. It does not block visitors, and it can even advertise the location of a page you would rather hide. Protect private material with a login or another real access control, and use robots.txt only to manage crawling.
- How do I check that the bots are obeying my rules?
- Look at your server logs for the user-agent names over time. A bot that claims a provider’s name but does not follow your rules, or that arrives from unexpected addresses, may not be genuine. Report unusual activity to the provider and, where needed, use firewall or rate-limit controls rather than relying on the name alone.
- How often should I review the crawler rules?
- Review them when a provider publishes new crawler documentation, when you change your site structure, and at least once a year as part of normal maintenance. Bot names and roles can change, so a rule that was right last year may now block something you meant to allow.