- robots.txt is a voluntary request, not an access control. Well-behaved bots follow it, but nothing forces them to, so never rely on it to protect private content.
- Blocking a training crawler and blocking a search or retrieval fetcher are different decisions with different consequences. Treat them separately.
- Decide which bots to allow from your own server logs and your business goals, not from a blocklist copied off someone else's blog.
robots.txt is a plain text file at the root of your domain that tells crawlers which parts of your site they may request. For AI crawlers it has two jobs: it expresses whether you want a given company's bot collecting your pages, and it is the only control most of those companies have publicly documented. It is a request, not a lock. Reputable bots honor it; nothing in the protocol prevents a bot that ignores it from fetching your pages. The more important point is that allow or block AI crawlers is not one decision. A training crawler that gathers pages to build a future model dataset is different from a fetcher that retrieves your page right now to answer a user's question. Make each choice on purpose, based on what you can see in your own logs, and not because a list on someone else's blog said so.
How robots.txt works
The format is simple, which is why it is easy to get wrong in small ways. A file is made of groups. Each group starts with one or more User-agent lines that name the crawler the rules apply to, followed by Disallow and Allow rules that describe paths. User-agent with an asterisk is the wildcard group, used by any crawler that does not have its own group. Disallow says which path prefix the named bot should not request; an empty Disallow allows everything. Allow carves out an exception to a broader Disallow, and when rules conflict, the most specific matching path generally wins under Google's rules. The Sitemap line gives the absolute URL of your sitemap and can appear anywhere in the file.
Paths are case-sensitive, so a Disallow on a capitalised folder does not block the lowercase version. Rules apply per host, so each subdomain needs its own robots.txt at its own root. The file is publicly readable by anyone, which matters for the security discussion later: anyone can open your robots.txt and see exactly which paths you asked crawlers to avoid.
What robots.txt does not do
Three things people often assume are false. First, it is voluntary. The protocol was formalized as RFC 9309 in 2022, and it describes how compliant crawlers should behave, not how to stop a non-compliant one. Well-run crawlers from large companies generally respect the file; some smaller or less scrupulous operators have been reported to ignore it. If the outcome matters, you need enforcement at the server, a CDN, or your application layer. Second, it is not a privacy or security tool. Disallowing a path does not hide it; it publishes a hint about where the interesting paths are. Private pages should require a login. Third, it does not remove pages from search: disallowing a URL stops compliant crawlers from requesting it, but a URL can still appear in search results if other pages link to it, and blocking the page can prevent a noindex tag from being seen.
The AI user agents people ask about
The list changes, and companies sometimes split or rename their agents, so verify against each operator's current documentation before shipping rules. GPTBot is OpenAI's crawler, described as used to collect content that may train future models; blocking it is generally understood as opting out of that training use. OAI-SearchBot is OpenAI's crawler for indexing content for ChatGPT search, a separate agent, so blocking it is more likely to affect whether your pages appear in ChatGPT's search-based answers. ChatGPT-User is used when a person asks ChatGPT to fetch a page during a conversation, and such user-initiated requests may not be governed by robots.txt the same way. PerplexityBot is Perplexity's crawler for building its search index. ClaudeBot is Anthropic's crawler, with separate agents documented for different functions.
Google-Extended is a robots.txt product token, not a separate crawler: it tells Google whether content already crawled for Search may be used for training Gemini models and for grounding, while Googlebot still crawls for Search. CCBot is the crawler for Common Crawl, a public web archive that many training datasets are built from, so blocking it limits inclusion in future snapshots. Bytespider is ByteDance's crawler, a good example of a bot where server logs and rate limits matter as much as the file. Amazonbot is Amazon's crawler. Applebot-Extended is a token that controls whether content Applebot has crawled can be used to train Apple's foundation models, while Applebot itself still crawls for Apple's search features.
Training crawlers versus retrieval and search fetchers
This distinction is the heart of the decision. Training crawlers collect pages that can feed the data used to build or improve a model. Blocking them is a decision about whether your content becomes part of that training data; the effect is slow and indirect, because you are not removing your site from anything that exists today, you are declining future use. The consequence to consider is that models may know less about your brand, products or expertise, which could reduce your presence in answers that rely on that knowledge. Retrieval and search fetchers request pages to answer a live question or power a search index. Blocking them has a more immediate effect: if a product cannot fetch your page, it may not cite you in answers that depend on current information, and you may not appear in that product's search results at all.
The honest tradeoff is this. Blocking training crawlers protects your content from future model training and may cost some long-term visibility in AI answers. Blocking retrieval fetchers protects less, because the content is already public, and it costs more immediate visibility. Allowing them does the reverse. Neither choice is inherently right. A news organization, a software documentation site, a retailer, and a personal blog should land in different places, and they probably should not all copy the same file.
Common mistakes
Most robots.txt problems are small syntax or scope errors with large effects. Blocking CSS and JavaScript is one: search and AI crawlers may render pages to understand them, so if your robots.txt disallows the folder that holds your stylesheets and scripts, a crawler may see a broken page. Disallow of the root by accident blocks the entire site, which often appears when a staging configuration is copied to production, so keep a deployment check that fails when a production robots.txt blocks everything. Group scope surprises are common: a crawler that has its own group ignores the wildcard group, so any rule you meant for everyone must be repeated inside a bot-specific group. Case and trailing slashes change scope, because rules are prefix matches and paths are case-sensitive. Using robots.txt as security is a mistake, because disallowed paths are public. Confusing disallow with noindex is another, because disallowing a page can prevent a crawler from seeing a noindex tag. And forgetting subdomains is common, because each host needs its own file.
An example robots.txt
Here is an example that shows the pattern: normal search crawling is open, a few private paths are kept out of the way, training crawlers are blocked on purpose, and search and retrieval fetchers are allowed. It is an illustration of structure, not a recommendation for your site.
# General crawlers: keep private application paths out of the way
User-agent: *
Disallow: /admin/
Disallow: /cart/
Allow: /
# Training crawlers: an explicit decision to opt out of training use
User-agent: GPTBot
Disallow: /
User-agent: CCBot
Disallow: /
# Search and retrieval fetchers: an explicit decision to allow
User-agent: OAI-SearchBot
Allow: /
User-agent: PerplexityBot
Allow: /
Sitemap: https://www.example.com/sitemap.xml
Notice that the GPTBot and CCBot groups do not repeat the Allow rule because they only need to say no. The OAI-SearchBot and PerplexityBot groups are explicit so that anyone reading the file can see the decision, and so that a future edit to the wildcard group does not change their behavior by accident. Explicit groups also make your intent auditable, which is valuable when a team changes over time.
Testing your rules
Test before you deploy, then test again after deployment. Start by fetching the file the way a crawler would: confirm that your robots.txt returns a 200 status, serves plain text, and shows the rules you intended. A redirect loop or a login wall in front of the file will confuse crawlers. Next, check the rules against specific URLs for specific agents. Google Search Console includes a robots.txt report that shows the file Google fetched and any errors it found, and several open-source parsers and online checkers can test a URL against a user agent. Run the paths you care about, including your most important product, article, and documentation pages. Finally, watch real behavior: a rule that looks correct in a checker tells you what the file says, not what bots do. After a change, monitor requests from the agents you targeted, and keep a record of each change, including the date, the reason, and the bots affected, because six months later nobody will remember why a given bot was blocked.
Where InstantIndexingPro fits
Most robots.txt advice stops at the file. The harder part is knowing which bots are actually visiting, how often, and which URLs they request, which is what makes the decision empirical instead of a guess. InstantIndexingPro submits your URLs to IndexNow, which supports the search engines that participate in that protocol, and it logs which bots fetch each URL on your site. That second part is the one that matters here: it lets you see whether OAI-SearchBot is visiting your product pages, whether PerplexityBot is fetching your documentation, or whether some agent you have never heard of is pulling your archive, before deciding whether to allow, block, or restrict a bot. It also closes the loop after a change: if you disallow a training crawler, the logs show whether its requests to the blocked paths stop. The point is not that a logging tool can make the decision for you. It is that the decision becomes something you can verify rather than something you have to trust.
What to do
Work through this in order; it takes an afternoon, not a project. First, look at what is already visiting: pull a few weeks of server or CDN logs and list the user agents that request your pages, noting which AI agents appear and which sections they request. Second, classify each agent as a training crawler, a search or index crawler, or a user-initiated fetcher, checking the operator's current documentation, and mark any bot you cannot classify as unknown and resolve it before writing a rule. Third, decide for each category, not for the whole web: ask what you want from each one, and consider the business effect on your site specifically. Fourth, write explicit rules, giving each bot you have a position on its own group, keeping private paths protected with authentication rather than robots.txt, and making sure CSS and JavaScript remain crawlable. Fifth, test before deploying, fetching the file, checking the status code, and running your key URLs against each user agent, with a deployment check that catches an accidental block of everything. Sixth, monitor after deploying, checking for several weeks whether targeted bots still request blocked paths and whether allowed bots keep visiting. Seventh, review on a schedule, because the set of AI agents and their documented purposes keeps changing. If you do only one thing from this list, make it the first step, because most teams that struggle with this decision are arguing from assumptions about bots they have never measured.