How-To Guide

Should I block GPTBot and other AI crawlers in robots.txt?

Should I block AI crawlers in robots.txt? Only after you decide what each bot may do with your pages. OpenAI lists separate crawlers for model training, for search and for user-initiated visits, so one rule does not fit all three.

Updated November 22, 2026

TL;DR

Decide bot by bot

Choose allow or disallow for GPTBot and OAI-SearchBot separately, since each setting is independent.

Write and test

Write the rules at the site root, then open robots.txt in a browser and read it back.

GrandRanker tracks the effect

GrandRanker writes search-led articles that your site publishes, so new pages keep arriving.

6 steps

Step-by-Step

  1. 1

    Decide the goal for each bot

    OpenAI says GPTBot is used to make our generative AI foundation models more useful and safe. Decide whether your content may be used for training, and decide separately whether you want ChatGPT search to show your pages.

  2. 2

    Write the GPTBot rule

    Add a group that names the bot with a User-agent line, then add a Disallow line for the paths you want blocked. Google's rules syntax is a field, a colon and a value, so write each line that way.

  3. 3

    Write the OAI-SearchBot rule

    Add a separate group for OAI-SearchBot with an Allow line for the paths you want shown in search. Keep it apart from the GPTBot group, so a change to one bot does not affect the other.

  4. 4

    Save the file at the site root

    Place robots.txt in the top-level directory of your site. Google says the file must be a UTF-8 encoded plain text file, with lines separated by CR, CR/LF, or LF.

  5. 5

    Test the live file

    Open yourdomain/robots.txt in a browser and read every line. OpenAI's crawler docs say updates to a site's robots.txt can take about 24 hours to take effect for search results, so check again the next day.

  6. 6

    Check the published IP ranges

    OpenAI publishes IP addresses for its crawlers at openai.com/gptbot.json and openai.com/searchbot.json. Use those ranges only if your firewall needs them, and leave robots.txt as the main control.

Should I block GPTBot to stop model training?

That depends on whether you want your content used to train generative AI models. OpenAI says GPTBot is used to make our generative AI foundation models more useful and safe, so the decision is about training, not about search.

Disallowing GPTBot signals that your site's content should not be used for training. It is a clear signal, and it is the setting to change when your goal is to keep content out of model training.

If you publish a lot of original writing, decide this before the next crawl. The choice applies to the content you publish from now on, so write the rule first and then review it each quarter as your goals change.

Does blocking GPTBot hide my site from ChatGPT search?

No, the search bot is a separate setting. OAI-SearchBot is for search, and each setting is independent of the others. ChatGPT-User is not used to determine whether content may appear in Search.

Blocking training therefore does not remove your pages from ChatGPT search, as long as OAI-SearchBot is not blocked. Check that rule separately after you write the GPTBot rule.

Common mistakes

Using a wildcard Disallow group that also blocks OAI-SearchBot without you noticing. Read every User-agent group in the file, and make sure each bot has its own rule.

Expecting robots.txt to stop every visit. OpenAI notes that robots.txt rules may not apply to user-initiated actions, so a block controls automatic crawling, not every request a user triggers.

Forgetting that a rule applies to the whole group under its User-agent line. A Disallow line placed under the wrong bot changes that bot's access, so check which group each line sits in before you save the file.

Sources

Frequently Asked Questions

Let GrandRanker Do This for You

Grandranker does this for you. GrandRanker writes and publishes search-led articles for your site, so the pages you allow have fresh content to read.