How to configure robots.txt for GPTBot, OAI-SearchBot and ChatGPT-User
OpenAI uses three different bots to train models, search the web and answer user questions. See how to audit logs, separate the rules in robots.txt and confirm the configuration worked.

OpenAI documents, on the platform's official bots page, four user-agents with distinct functions: GPTBot, OAI-SearchBot, ChatGPT-User and OAI-AdsBot. The problem is that many people treat the first three as if they were the same thing and write a generic User-agent: * rule in robots.txt, blocking or allowing everything at once. That throws away half the control OpenAI itself gives the webmaster.
The documentation is explicit: "each configuration is independent of the others," and a site can allow OAI-SearchBot to appear in search results while blocking GPTBot to prevent crawled content from being used in training. That's the fine-tuning this guide walks through, from the raw log to the test in ChatGPT Search.
Three bots, three different decisions
Before touching robots.txt, it's worth pinning down what each agent does, because the decision to block or allow changes depending on the goal.
| User-agent | What it's for | Affects model training | Affects appearing in search |
|---|---|---|---|
GPTBot | Crawls content to train OpenAI's foundation models | Yes | No |
OAI-SearchBot | Indexes pages for ChatGPT's search responses | No | Yes |
ChatGPT-User | Visits pages on demand, when a user asks something specific in ChatGPT or in a custom GPT | No | No (the docs state this agent "is not used to determine whether content can appear in Search") |
OAI-AdsBot | Validates landing pages submitted as ads | No | No |
OpenAI itself warns that, if a site allows both the training and search bots, it "may use the result of a single crawl for both uses, to avoid duplicate crawling." In other words: allowing both doesn't double the load on the server, but blocking only one requires separate, explicit rules, because a generic rule treats all agents the same way.
Step 1: audit the logs before touching any rule
The first mistake is editing robots.txt without knowing whether these bots are already accessing (or not) the site. Run a count per user-agent on the server's access log:
grep -ic "GPTBot" /var/log/nginx/access.log
grep -ic "OAI-SearchBot" /var/log/nginx/access.log
grep -ic "ChatGPT-User" /var/log/nginx/access.logIf all three return zero, the site has probably never been crawled by any of them, and the priority is to allow OAI-SearchBot before thinking about blocking anything. If GPTBot already shows up in volume and you want to prevent training, confirm the requests really come from OpenAI, and not from someone spoofing the User-Agent header:
grep "GPTBot" /var/log/nginx/access.log | awk '{print $1}' | sort -u > ips_gptbot.txt
curl -s https://openai.com/gptbot.json | jq -r '.prefixes[].ipv4Prefix' > faixas_oficiais.txtWith both lists in hand, cross-check the IPs from your log against the published CIDR prefixes (openai.com/gptbot.json, openai.com/searchbot.json and openai.com/chatgpt-user.json, one JSON file per bot). A request with User-Agent: GPTBot coming from outside those ranges is, at minimum, suspicious and shouldn't inform your decision to block or allow.
Step 2: write separate rules in robots.txt
With the logs audited, robots.txt looks like this for those who want to appear in ChatGPT search but don't want to feed model training:
User-agent: GPTBot
Disallow: /
User-agent: OAI-SearchBot
Allow: /
User-agent: ChatGPT-User
Allow: /Notice there's no User-agent: * block in this example. If you already have a generic catch-all in the file (User-agent: * followed by Disallow: /admin, for example), it still applies to any bot without its own block, but the specific blocks for GPTBot, OAI-SearchBot and ChatGPT-User always take priority over the generic one for those three agents. That's how you block training without blocking search: the more specific rule wins.
It's worth remembering three details the documentation makes explicit, which change the strategy for those who rely on automation:
ChatGPT-Useronly acts when a user asks for something specific inside ChatGPT; OpenAI warns that, since it's an action triggered by a person, "robots.txt rules may not apply" to it the same way they apply to an automated crawler.OAI-SearchBotis the only agent that decides whether the site appears in search responses; blockingChatGPT-Userdoesn't remove the site from search, and allowingChatGPT-Userdoesn't guarantee it will appear there.- If the site also runs ads on ChatGPT, there's still
OAI-AdsBotto consider, which only visits pages submitted as ads and, according to the docs, never feeds foundation model training.
Step 3: validate by testing real prompts in ChatGPT Search
Editing the file isn't the end of the work: you need to confirm the change actually affected what appears in ChatGPT's responses. OpenAI warns that, for OAI-SearchBot, "it can take about 24 hours, from the moment a site's robots.txt is updated, for the systems to adjust." Plan the test in two rounds, with that interval in between.
- Before editing the file, choose three to five prompts a real user would ask, which by subject should pull up a page from your site as a source. Run each one in ChatGPT with search enabled and record whether the domain appears as a citation or link.
- Publish the new
robots.txtrules and wait at least 24 hours, the timeframe OpenAI itself indicates for search reindexing. - Run the same prompts again, under the same conditions, and compare: if you allowed
OAI-SearchBot, the domain is expected to start appearing (or appear again) in the responses; if you blocked it, the opposite is expected. - In parallel, go back to the server logs and confirm
GPTBotstopped hitting the site (or thatOAI-SearchBotstarted appearing, if that was the allowance made). A crawler that ignores aDisallowafter 24h is a sign of an outdatedrobots.txtcache on your CDN, not bad faith from the bot.
The two-sided test (server log + prompt in the product) is what closes the loop: the log shows whether the crawler obeyed the rule, the prompt shows whether the combined effect (allowed crawling, search indexing, display in the response) reached the end user.
Common mistakes that trip up this configuration
Some stumbles show up frequently in this type of configuration, and it's worth checking each one before considering the task done:
- Leaving a
User-agent: *withDisallow: /at the top of the file and assuming it doesn't affect OpenAI's three bots: it does, unless there's a specific per-agent block afterward. - Confusing "I blocked GPTBot" with "I blocked search appearance": they're different systems, controlled by different agents.
- Validating the rule just by looking at the rendered
robots.txt, without checking the server log after a few days, to confirm the bot actually stopped (or started) accessing. - Ignoring
ChatGPT-Userby assuming it always obeysrobots.txtthe same way an automated crawler does; the docs themselves warn that, being a user action, that may not hold.
What's still left open
OpenAI's documentation is clear about what each bot does going forward, but it doesn't say what happens to content already crawled by GPTBot before a Disallow takes effect. Blocking today prevents new crawling; there's no guarantee, on the page itself, about data already used in previous training runs. For those who measure GEO (generative search visibility) as a traffic metric, the logical next step after this configuration is to repeat the step 3 test periodically, because OpenAI may update how OAI-SearchBot weighs content without necessarily announcing the change.
Translated from the Brazilian Portuguese original · Read the original
Google Search Central guide explains how to adjust robots.txt and structured data for AI Overviews and AI Mode
Google Search Central documentation, updated in December 2025, shows there is no extra technical requirement to appear in AI Overviews and AI Mode. What decides it is solid basic SEO, the correct snippet controls, and a careful reading of Search Console.