Schema and AI search

ClaudeBot, GPTBot and other AI crawlers: how to allow or block them

What ClaudeBot, GPTBot and other AI crawlers are, how robots.txt rules for them work, how to decide whether to allow them, and how to check your file.

ClaudeBot is Anthropic's crawler, and GPTBot is OpenAI's. Both names can appear in your server logs, and both can be addressed in one plain text file called robots.txt, which sits at the root of your website. This guide explains how that file works, what the trade-off looks like for a small business, and how to check the rules you already have.

What an AI crawler is, and the names you will see, such as ClaudeBot

A crawler is a program that fetches web pages and reads them. Each crawler identifies itself with a name, and that name is what you see in your logs and what you write in your robots.txt rules. AI companies publish the names of the crawlers they run, so that site owners can decide what those crawlers may do on their sites.

The names you are most likely to meet are these:

  • ClaudeBot, Anthropic's crawler
  • GPTBot, OpenAI's crawler
  • PerplexityBot, Perplexity's crawler
  • OAI-SearchBot and Claude-SearchBot, which are named separately from the crawlers above

Search engines use crawlers too, such as Googlebot and Bingbot. A rule that names one crawler affects only that crawler, so you can allow search engines and still decide differently for an AI crawler. No single switch covers every AI crawler, so each name needs its own rule.

How robots.txt addresses a crawler by name

Robots.txt is a short text file. Each rule group starts with a User-agent line that names a crawler, followed by Disallow or Allow lines that list paths. A path that starts with a slash counts from the root of your site. This rule stops ClaudeBot from fetching anything inside a private folder:

A woman reviews a laptop and a plain sheet of paper at a small office desk.
Website access rules begin with a file the business owner can review.
User-agent: ClaudeBot
Disallow: /private/

A crawler follows the group whose name matches it most closely. If no group names it, the group marked with a star (*) applies to it. Anyone can read the file by adding /robots.txt to the end of your website address. For a fictional site, the address would look like this:

https://www.example.org/robots.txt

Robots rules are one part of a site's technical basics, and the structured data guide covers the rest. Khoji's crawler access check reads this file and lists each named crawler as allowed or blocked.

Allow or block: the trade-off for a business that wants visibility

Allowing an AI crawler lets that AI system read your public pages. Blocking it keeps your content out of that system, for as long as the crawler honours the rule. Neither one guarantees that an AI system will mention you, and no tool can promise that either.

For most small businesses the public pages are the ones that describe the work: the services you offer, your opening hours, your location, your fees in plain words and your contact details. A clinic might want its service pages read. A shop might want its product pages read. Private areas, such as a customer login, a billing page or a staff folder, are better kept out of every crawler's reach. For those, robots.txt is not enough on its own, as explained below.

Decide each crawler separately and write the decision in one sentence beside the file, such as "We allow search engines and block GPTBot." A redesign or a new plugin can change the file without anyone meaning it to, and a written decision makes that change easy to spot.

Allow or block an AI crawlerA comparison of what allowing and blocking an AI crawler does for your public pages.Allow or block an AI crawlerAllowBlockWhat it doesLets that AI systemread your publicpagesKeeps your contentout of that systemLimitCovers public pages,not private areasWorks only if thecrawler honours theruleGuaranteeNo guaranteedmentionNo guaranteed resultAUTOMIX AI
Neither choice guarantees that an AI system will mention you.

Example rules for allowing all, blocking one, blocking all

Copy the pattern you need, then check the result.

  1. Allow every crawler. Use a group with an empty allow rule for all crawlers:
User-agent: *
Allow: /
  1. Block one AI crawler and leave the rest alone:
User-agent: GPTBot
Disallow: /
  1. Block a list of AI crawlers, one group for each name:
User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

User-agent: PerplexityBot
Disallow: /
  1. Block every crawler, which is the blunt option:
User-agent: *
Disallow: /

The last pattern also stops Googlebot and Bingbot, so your pages can drop out of search results. Use it only when that is what you want. Save the file as plain text named robots.txt, keep one blank line between groups, and place it at the root of the site, not inside a subfolder.

Checking your file crawler by crawler

Work through these steps once, and again after any change to the site:

  1. Open your robots.txt address in a browser.
  2. Find every User-agent line and read the lines that follow it.
  3. Check that each crawler name is spelt exactly as its owner publishes it, such as ClaudeBot and not "Claude bot".
  4. Run a crawler access check. Khoji's check reads the file for 19 named crawlers, including GPTBot, ClaudeBot and PerplexityBot, and reports allowed or blocked for each one.
  5. Note the date and the result, so you can compare later.

For a quick look at one file, the robots.txt checker is the simplest place to start.

Checking your robots.txt fileFive steps to check how each AI crawler is treated in your robots.txt file.Checking your robots.txt file1Open your robots.txt addressAdd /robots.txt after your site address2Find each User-agent lineThen read the lines that follow it3Check each crawler nameSpell it exactly as its owner publishes it4Run a crawler access checkAllowed or blocked, for each crawler5Note the date and the resultSo you can compare laterAUTOMIX AI
Work through these steps once, and again after any change to the site.

What robots.txt cannot do: it is a request, not a wall

Robots.txt tells crawlers which paths they may fetch. Well-behaved crawlers read the file and follow it. A crawler that ignores the file is not stopped by it, so the file cannot lock content away. Anyone who has the address of a public page can still open that page in a browser.

A man places a plain folder in a desk drawer at a clinic front desk.
Private records need protection beyond a crawler request.

If something must stay private, put it behind a login or a password. Use robots.txt for the public pages you have a view on, and treat it as a clear statement of your choice, not as a security measure. Khoji's own crawl follows the same rule: it checks robots.txt before every fetch, so a crawl of your site respects the file you wrote.

Plans for Khoji are listed on the Automix AI pricing page.

Frequently asked questions

What is ClaudeBot?

ClaudeBot is the name of Anthropic's web crawler. Anthropic publishes the name so that website owners can write robots.txt rules for it. Your robots.txt file sits at the root of your site and tells ClaudeBot which paths it may fetch. A crawler that follows the file will respect those rules. You can check how your file treats ClaudeBot at any time.

How do I block GPTBot in robots.txt?

Add a rule group that names GPTBot, then a line that says Disallow: / underneath it. Save the rule in a plain text file called robots.txt at the root of your site. The rule asks GPTBot not to fetch any page on your site. GPTBot is OpenAI's crawler, and a crawler that follows robots.txt will respect the rule. Check the result with a crawler access check after you save the file.

Should a business block AI crawlers?

It depends on what you want. Allowing AI crawlers lets AI systems read your public pages. Blocking them keeps your content out of those systems, for the crawlers that honour the rule. Neither choice brings customers by itself. Decide crawler by crawler, based on what your public pages say about your business and what you want people to find.

How do I check which crawlers my site allows?

Open your robots.txt file in a browser, or run a crawler access check. Khoji's check reads the file for each of 19 named crawlers, including GPTBot, ClaudeBot and PerplexityBot, and reports whether each one is allowed or blocked. If a site has no robots.txt file, Khoji reports that everything is allowed rather than flagging a fault.

Want to see how your own site looks to crawlers? Run a Khoji SEO analysis on your own site and read the crawler access results with the rest of the findings.

More in Schema and AI search

All Schema and AI search guides · Khoji blog

Run a Khoji SEO analysis on your own site