How to Block AI Crawlers Without Disappearing From AI Search

Block AI crawlers like GPTBot, ClaudeBot and CCBot with robots.txt, nginx, Apache or Cloudflare, and keep the search bots that get you cited in AI answers.

Search Noir TeamUpdated December 4, 202614 min read
Robots.txt cover with two panels: training bots GPTBot, ClaudeBot, Google-Extended and CCBot set to Disallow, and search bots OAI-SearchBot, Claude-SearchBot, PerplexityBot and Googlebot set to Allow

Most guides to blocking AI crawlers stop at one snippet: User-agent: GPTBot, Disallow: /. That snippet works, but it answers the wrong question. AI companies now run separate bots for training their models, for building their search indexes and for fetching a page when a user asks. Block the training bots and nothing visible changes. Block the search bots and you can disappear from ChatGPT, Claude and Perplexity answers.

This guide shows how to block AI crawlers in robots.txt, on nginx and Apache, in Cloudflare and on WordPress, which bots to keep, and how to check that the block works. We checked every bot's behavior against the company's own documentation on December 4, 2026.

The short answer

If you want to stop AI companies training on your content but still appear in AI search answers, add this to your robots.txt:

User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: meta-externalagent
User-agent: CCBot
User-agent: Amazonbot
User-agent: MistralAI-Training
Disallow: /

Several User-agent lines followed by one rule is valid robots.txt: the rule applies to every bot named above it. Leave OAI-SearchBot, Claude-SearchBot, PerplexityBot, Googlebot and bingbot alone. Those are the bots that decide whether AI search can find and cite you.

If you want to block AI crawlers completely, including AI search, read the section on what you lose first. For most businesses that sell something, it's the wrong trade.

The three kinds of AI bots

Every major AI company now separates its bots by job. This is the single most useful thing to understand before you block anything.

  1. Training bots collect pages that may be used to train AI models. Blocking them doesn't change what users see today.
  2. Search bots build the index an assistant searches when it answers a question. Blocking them can remove you from that assistant's answers and citations.
  3. User-triggered fetchers visit a page because a user asked the assistant to read it. Several companies say these may not follow robots.txt at all, because a person made the request.
CompanyTrainingAI searchUser-triggered
OpenAIGPTBotOAI-SearchBotChatGPT-User
AnthropicClaudeBotClaude-SearchBotClaude-User
PerplexityNot used for training, per PerplexityPerplexityBotPerplexity-User
GoogleGoogle-Extended (a control token, not a crawler)GooglebotGoogle-Agent
AppleApplebot-Extended (a control token)Applebotn/a
Metameta-externalagentmeta-webindexermeta-externalfetcher
AmazonAmazonbotAmzn-SearchBotAmzn-User
MistralMistralAI-TrainingMistralAI-IndexMistralAI-User
Common CrawlCCBot (an open archive that many AI datasets use)n/an/a

A few details matter more than they look:

  • OpenAI says sites that opt out of OAI-SearchBot won't be shown in ChatGPT search answers, though they can still appear as navigational links. GPTBot and OAI-SearchBot are set independently, so blocking one doesn't block the other.
  • Anthropic says its bots honor robots.txt, and that blocking Claude-SearchBot may reduce your visibility and accuracy in Claude's search results.
  • Perplexity says PerplexityBot isn't used to train foundation models, so blocking it only costs you Perplexity visibility.
  • Google-Extended and Applebot-Extended are not crawlers. They're tokens that tell Google and Apple how they may use pages their normal crawlers already fetched. You can only set them in robots.txt; a firewall rule can't match them, because no request ever arrives with that name.

Our AI crawler directory lists more than 30 bots with their purpose, robots.txt behavior and official IP lists.

Should you block AI crawlers?

It depends on what your site earns from being read.

Your siteTraining botsAI search botsWhy
SaaS, B2B, ecommerce, servicesYour callAllowBuyers ask assistants for shortlists. Being cited there is marketing.
Ad-funded publisherBlockAllow, but watch referralsTraining gives nothing back; search sends some traffic and citations.
Paywalled or licensed contentBlockConsider blockingAnswers can summarize what readers would otherwise pay for.
Docs and developer contentAllowAllowYou want assistants to answer correctly about your product.
Private or staging sitesBlock everythingBlock everythingUse authentication, not robots.txt.

Blocking training bots is mostly a statement of principle: it applies to future crawling, and it doesn't remove anything a model has already learned. Blocking search bots has a measurable cost. If you're unsure, block training and keep search, then measure what happens.

Method 1: Block AI crawlers in robots.txt

Robots.txt is the standard way to tell crawlers what they may fetch. It lives at yourdomain.com/robots.txt, and every major AI company documents support for it for its training and search bots.

Use the snippet from the short answer above. It blocks the main training bots and control tokens while leaving every search bot alone.

User-agent: GPTBot
User-agent: OAI-SearchBot
User-agent: ClaudeBot
User-agent: Claude-SearchBot
User-agent: PerplexityBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: meta-externalagent
User-agent: meta-webindexer
User-agent: CCBot
User-agent: Amazonbot
User-agent: Amzn-SearchBot
User-agent: MistralAI-Training
User-agent: MistralAI-Index
Disallow: /

This keeps Googlebot and bingbot, so your classic search rankings are untouched. It doesn't stop user-triggered fetchers, and it doesn't keep you out of Google's AI Overviews or Microsoft Copilot (more on that below).

Block one folder only

User-agent: GPTBot
User-agent: ClaudeBot
Disallow: /research/
Disallow: /members/

The precedence trap

A crawler obeys only the most specific group that names it. If your file has a User-agent: * group with rules such as Disallow: /admin/, and you add a separate group for GPTBot, GPTBot ignores the * rules completely. That's usually fine when the GPTBot group says Disallow: /. It's a problem when you write a narrow rule for a bot and expect it to inherit everything else. Repeat any shared rules inside each named group.

Two more things to know. Changes aren't instant: OpenAI and Perplexity say updates can take about 24 hours to apply. And robots.txt is a request, not a lock. Reputable crawlers follow it; others don't.

If you'd rather not edit the file by hand, our free robots.txt generator builds these rules with checkboxes for each bot.

Google and Bing work differently

This is where most guides get it wrong, and where the stakes are highest.

Google: Google-Extended doesn't control AI Overviews

Google-Extended controls whether Google may use your content to train future Gemini models and to ground answers in products such as the Gemini app. Google says it doesn't affect inclusion or ranking in Google Search. It also doesn't control AI Overviews or AI Mode. For those, Google points site owners to a separate setting.

That setting is the Search generative AI control in Search Console. Google's documentation on generative AI controls says it manages whether your content is used for grounding or displayed, including links, in features such as AI Overviews and AI Mode. It doesn't affect model training, and Google says it isn't used as a ranking signal elsewhere in Search. Google added it to its documentation in October 2026.

So for Google there are three separate decisions:

  1. Training and Gemini grounding: Google-Extended in robots.txt.
  2. AI Overviews and AI Mode: the Search generative AI control in Search Console, or nosnippet on individual pages.
  3. Classic search: Googlebot. Blocking it removes you from Google entirely, so almost nobody should.

Before you opt out of AI Overviews, check what you'd lose. Our guide on how to track AI Overview citations shows how to see which of your keywords trigger one and whether you're cited.

Bing and Copilot: new preferences from February 2027

Microsoft doesn't have a separate AI crawler. Bingbot crawls for Bing, and Copilot's web answers are grounded in Bing. Blocking bingbot removes you from both, which is rarely what you want.

Instead, Microsoft announced new training and grounding preferences in October 2026:

  • AI training: a robots.txt group for __usage_ai-training, or a page-level ai-training:disallow value in a Bingbot meta tag or X-Robots-Tag header.
  • AI grounding: a page-level ai-grounding:disallow value, which keeps a page out of grounded AI answers.

Microsoft will honor the new preferences from February 1, 2027, and says the old NoArchive and NoCache tags will stop being read as training or grounding preferences after March 1, 2027. The preferences don't change eligibility for regular Bing results. If you used NoArchive or NoCache to keep content out of Bing Chat in 2023, now is the time to switch.

A shared training signal is coming

The __usage_ai-training group is not Bing-only. It comes from the IETF's AI preferences (AIPREF) work, and other companies are lining up behind it:

  • Google said in October 2026 that it plans to support a shared AI training control in robots.txt in 2027. If you opt out with it and don't mention Google-Extended, Google will treat that as a Google-Extended disallow.
  • Anthropic says that as of October 30, 2026 it has begun recognizing a machine-readable training preference based on the same IETF work, and that a rule naming ClaudeBot directly takes priority.

Once support is broad, one group could replace a long list of training bots:

User-agent: __usage_ai-training
Disallow: /

Until then, keep the named bots in your file as well. Company-specific rules keep working alongside the shared signal.

Method 2: Block AI bots at the server (nginx and Apache)

Robots.txt relies on the crawler choosing to obey. A server rule refuses the request outright. Use it for bots that are reported to ignore robots.txt, or when crawling load is the real problem.

Server rules match the user-agent string, so they only work for real crawlers. Google-Extended and Applebot-Extended can't be blocked this way, because they never send requests under those names.

nginx

Put both map blocks inside the http block (often nginx.conf) and the check inside your site's server block:

map $http_user_agent $ai_bot {
    default 0;
    ~*(GPTBot|ClaudeBot|CCBot|Bytespider|meta-externalagent|Amazonbot) 1;
}

# Block those bots everywhere except /robots.txt
map "$ai_bot:$uri" $block_ai {
    default          0;
    "1:/robots.txt"  0;
    ~^1:             1;
}

server {
    # ...your existing configuration...

    if ($block_ai) {
        return 403;
    }
}

The second map keeps /robots.txt reachable: nginx checks exact matches before regular expressions, so a bot asking for robots.txt is let through and everything else gets a 403. This matters because Anthropic warns that blocking its bots by IP can stop them reading your robots.txt, and a crawler that can't read the file can't see your rules.

Apache (.htaccess)

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/robots\.txt$
RewriteCond %{HTTP_USER_AGENT} (GPTBot|ClaudeBot|CCBot|Bytespider|meta-externalagent|Amazonbot) [NC]
RewriteRule ^ - [F,L]

[F] returns 403 Forbidden. Test on a staging copy first: a typo in .htaccess can take the whole site down.

A word on spoofing

Anyone can send a request that claims to be GPTBot. A user-agent rule blocks honest bots and impostors alike, which is usually what you want. If you want to allow a bot and be sure it's genuine, check the request IP against the company's published list. OpenAI, Anthropic, Perplexity, Google and Apple all publish theirs, and our AI crawler directory links to each one.

Method 3: Block AI crawlers in Cloudflare

If your site runs through Cloudflare, you can manage AI crawlers without touching your server.

  • Search, Training and Agent controls. In September 2026, Cloudflare said its single Block AI Bots toggle will be deprecated in favor of three separate controls, plus a Disallow AI Training setting that blocks training while still allowing search crawling. This maps neatly onto the three kinds of bots above.
  • AI Crawl Control (formerly AI Audit) shows which AI crawlers visit, how often, and whether they respect your robots.txt, and lets you allow or block each one. It's available on all plans.
  • Managed robots.txt and Content Signals. Cloudflare can add directives to your robots.txt for you, including a Content-Signal line such as search=yes, ai-train=no. Its current documentation says Bot Preference Sync now generates these directives from your Search, Agent and Training policies.

One thing to check: Cloudflare has blocked AI crawlers by default on new domains since July 2025, and announced new default presets in 2026. If you added your site recently and wondered why AI search never cites you, look here first. Content Signals are a preference, not a standard every AI company has adopted, so keep your named robots.txt rules too.

How to block AI crawlers on WordPress

WordPress serves a virtual robots.txt unless a real robots.txt file exists in your site's root folder. That gives you three options:

  1. An SEO plugin's file editor. Yoast SEO and Rank Math both let you edit robots.txt from the WordPress admin. Paste the rules from Method 1.
  2. A real file. Upload a robots.txt to the root folder by SFTP or your host's file manager. It replaces the virtual one, so copy over anything the virtual file contained, such as your sitemap line.
  3. A dedicated plugin. Several plugins add AI bot rules with a checkbox. Check which bots they include; older plugins often block only GPTBot, or block search bots along with training bots.

Your host or CDN may also have a one-click AI bot setting. If you use one, check what it blocks, then confirm the result with the steps below.

How to check that the block works

Don't assume it worked. Check all three layers.

  1. Read your live robots.txt. Open yourdomain.com/robots.txt in a private window. Caching plugins and CDNs sometimes serve an old copy.
  2. Run it through a checker. Our free AI crawler checker reads your live robots.txt and shows, bot by bot, which AI crawlers are allowed or blocked, including the ones that fall back to another bot's rules.
  3. Test server rules with curl. A request with a bot's user agent should get a 403 if your nginx or Apache rule works:
curl -I -A "GPTBot" https://yourdomain.com/

This only tests server rules. A robots.txt block can't be tested this way, because robots.txt asks the crawler to stay away; it doesn't refuse the request.

  1. Watch your logs. After a few days, count requests from each bot:
grep -c "GPTBot" /var/log/nginx/access.log

Requests that continue after a robots.txt block can come from user-triggered fetchers, impostors or a slow cache refresh. That's when a server rule earns its keep.

What you lose when you block AI search bots

Blocking a search bot isn't free. When OAI-SearchBot, Claude-SearchBot or PerplexityBot can't read your pages, those assistants can't cite them, and they'll answer your buyers' questions from someone else's pages. Our AI search statistics roundup shows how many people now use these tools.

Make the decision with data:

  1. Measure before you change anything. Pick 15 to 30 questions your buyers ask and record whether each assistant mentions or cites you. Our guide to tracking brand mentions in AI answers explains how.
  2. Change one thing. Block training bots first. They have no effect on what assistants show today.
  3. Measure again after four weeks. AI answers vary from run to run, so compare weekly trends, not single answers.

Search Noir (we make it) does this tracking automatically: you add the questions, and each week it asks ChatGPT, Perplexity, Gemini and Claude and records whether you were mentioned, cited and quoted. See AI search visibility tracking. It also flags which Google keywords show an AI Overview, so you can see what an AI Overview opt-out would cost before you make it.

What blocking doesn't do

  • It doesn't remove past training data. Blocks apply to future crawling. Content a model already learned from stays learned.
  • It doesn't stop user-triggered fetchers. OpenAI says robots.txt rules may not apply to ChatGPT-User, and Perplexity says Perplexity-User generally ignores them, because a person asked for the page.
  • It doesn't stop other sites quoting you. If a review site or forum summarizes your page, assistants can cite that summary instead.
  • It doesn't make content private. Robots.txt is public, and anyone can still read your pages. For private content, use logins.

FAQ

Does blocking GPTBot remove my site from ChatGPT?

No. GPTBot only collects content for training. ChatGPT search uses OAI-SearchBot, and OpenAI sets the two independently. To stay visible in ChatGPT search, keep OAI-SearchBot allowed.

Does blocking AI crawlers affect my Google rankings?

Not if you leave Googlebot alone. Google says Google-Extended doesn't affect inclusion or ranking in Google Search. Blocking GPTBot, ClaudeBot or CCBot has no effect on Google.

Does Google-Extended stop AI Overviews from using my content?

No. Google-Extended covers Gemini training and grounding outside Search. AI Overviews and AI Mode are managed with the Search generative AI control in Search Console or with nosnippet on individual pages.

Can AI crawlers ignore robots.txt?

Yes. Robots.txt is voluntary. The major companies say their training and search bots follow it, but user-triggered fetchers may not, and some crawlers are reported to ignore it. A server or Cloudflare rule refuses the request instead of asking.

Should I block all AI crawlers or only training crawlers?

For most businesses, only training crawlers. Blocking search bots can remove you from AI answers, and that's where a growing share of buyers start their research. Publishers who rely on paid content are the main exception.

How often should I update my AI crawler rules?

Check them every few months. New bots appear regularly, and companies rename or split existing ones. Our AI crawler directory is updated whenever a company changes its documentation.

Sources: OpenAI crawlers, Anthropic crawlers, Perplexity crawlers, Google-Extended, Google generative AI controls, Google on a shared AI training control, Microsoft on training and grounding preferences, Cloudflare on Search, Training and Agent controls, Cloudflare managed robots.txt.

See where you rank. Google, Bing & AI.

Free plan, no card. Your first case file is ready tomorrow morning.

Open a case — free

Read next