AI companies run crawlers that read public websites, some to train models and some to fetch pages when a user asks a question. If you would rather they stayed away from your articles, product photos or course material, the standard way to say so is a few lines in your robots.txt file. The quickest route is the Robots.txt Generator, which has a "Block AI crawlers" tick box. This post shows the exact lines it writes, explains what each crawler is for, and tells you what you give up by blocking.
The short version
To ask OpenAI's GPTBot to stay out of your whole site, add these two lines to robots.txt:
User-agent: GPTBot
Disallow: /
User-agent names the crawler and Disallow: / means "nothing on this site". Repeat the pair for every crawler you want to block, or put several User-agent lines above a single Disallow: / to cover them all at once.
Block them all with the generator
- Open Robots.txt Generator.
- Press the "Block AI crawlers" preset button, or tick "Block AI crawlers (16: GPTBot, ClaudeBot, Google-Extended, CCBot…)".
- Leave Default on "Allow crawling" so normal search engines are unaffected.
- If you have a sitemap, type its full address in "Sitemap URLs".
- Press Copy or Download, then upload the file to the root of your site.
With nothing else filled in, the file you get is:
# AI crawlers (training and AI answers)
User-agent: GPTBot
User-agent: ChatGPT-User
User-agent: OAI-SearchBot
User-agent: ClaudeBot
User-agent: Claude-User
User-agent: anthropic-ai
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: CCBot
User-agent: PerplexityBot
User-agent: Bytespider
User-agent: Meta-ExternalAgent
User-agent: Amazonbot
User-agent: cohere-ai
User-agent: Diffbot
User-agent: ImagesiftBot
Disallow: /
User-agent: *
Allow: /
The first group applies to all 16 names at once. The second group, User-agent: * with Allow: /, is for every other crawler and keeps them welcome. The line starting with # is a comment that crawlers skip.
What the 16 names are
The tool uses each company's published user-agent name. As the companies describe them, they fall into a few kinds:
| Kind | Names in the list | Blocking it means |
|---|---|---|
| Model training | GPTBot, ClaudeBot, anthropic-ai, CCBot, Bytespider, Meta-ExternalAgent, cohere-ai, ImagesiftBot | Your pages are not collected for training sets |
| Opt-out tokens | Google-Extended, Applebot-Extended | Google and Apple are told not to use your content for their AI features; their normal search crawlers are not affected |
| AI search and answers | OAI-SearchBot, PerplexityBot, Amazonbot | Your site may not be listed or cited in those products |
| Fetch on request | ChatGPT-User, Claude-User | The assistant cannot open your page when a user pastes a link or asks about it |
| Data services | Diffbot | Your pages are not collected for its data products |
Read the table before you tick the box. The checkbox blocks all 16, including the ones that work like search engines. If you want to be mentioned in AI answers, you probably do not want OAI-SearchBot, PerplexityBot, ChatGPT-User or Claude-User in the blocked list.
Block only some of them
The generator has no list of individual bots to untick, so the easy way is to edit the output. Copy the text into any editor and delete the lines you do not want. For example, to block training crawlers but leave AI search and fetch-on-request bots alone:
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: CCBot
User-agent: Google-Extended
Disallow: /
User-agent: *
Allow: /
Then paste the edited file into the Robots.txt Tester to check it before you upload.
Block only part of your site
You do not have to block everything. To keep GPTBot out of a members-only folder and your photo gallery, but let it read the blog:
User-agent: GPTBot
Disallow: /members/
Disallow: /gallery/
The generator's path boxes apply to all crawlers, not to one named bot, so for a rule aimed at a single bot you write the group by hand like this and check it in the Tester.
Test that it works
- Open Robots.txt Tester.
- Paste your file into "robots.txt (editable)", or type your domain and press "Fetch robots.txt" once the file is live.
- Under "3. Test URLs", choose GPTBot (OpenAI) in the crawler list and enter a path such as
/blog/my-post. - The Results table should show Blocked, with the matching rule
Disallow: /and its line number. - Switch the crawler to Googlebot and test the same path. It should show Allowed, with "No rule matches (allowed by default)" or your
Allow: /line, so search traffic is safe.
The tester also tells you which group applied: for the full list above it reads "Rules for GPTBot come from the group on line 2", meaning the group that starts at the first User-agent line. For a crawler that is not in the dropdown, such as one you saw in your server logs, choose "Custom…" and type its name.
Limits you should know about
- It is a request, not a lock. Reputable crawlers follow robots.txt. Others do not, and a crawler can also pretend to be a browser. If a bot ignores you, block it at the server or firewall, not in this file.
- It is not retroactive. Robots.txt does not delete anything already collected. It only governs future visits.
- It does not hide pages from people. Anyone with the link can still open a blocked page.
- Caches take time. Crawlers may keep using an older copy of robots.txt for a while, so a new rule is not instant.
- New bots appear. The list in the tool covers published names today. Check your server logs now and then for new ones and add them.
Should you block AI crawlers?
It depends on what your site is for. A publisher with original articles or a photographer selling prints may want control over reuse. A local business, a government-job information site or a shop that wants customers to find it through AI assistants may gain by staying open, because a blocked site cannot be cited. There is no right answer, and you can change the file at any time.
If you do block, keep everything else in robots.txt tidy: your normal rules for admin and cart pages, and your sitemap line. The complete guide to writing robots.txt covers those, and the Sitemap Generator makes the sitemap.
Quick checklist
- Add one group with every bot you want to block, ending in
Disallow: /. - Keep a separate
User-agent: *group so search engines stay unaffected. - Decide whether to block search and fetch bots as well as training bots.
- Test GPTBot and Googlebot in the Robots.txt Tester.
- Upload the file to your site's root and check that
/robots.txtopens.



