Skip to content

How to Block AI Crawlers Like GPTBot Without Hurting Your SEO

Learn how to block AI crawlers like GPTBot, ClaudeBot and CCBot with robots.txt and server rules while keeping your Google and Bing rankings intact.

By Devma Hosting Team · · 8 min read

To block AI crawlers, add rules to your site's robots.txt that disallow AI training bots such as GPTBot, ClaudeBot, CCBot, Google-Extended and Applebot-Extended, and leave Googlebot and Bingbot alone. That tells AI companies not to use your content for model training without changing how search engines crawl and rank you. Because robots.txt is voluntary, back it up with a server or firewall rule for bots that don't follow it.

Key takeaways

  • AI bots come in three kinds: training crawlers, AI search crawlers and user-triggered fetchers. You can allow or block each kind separately.
  • Blocking GPTBot, ClaudeBot or Google-Extended does not affect your Google Search rankings. Blocking Googlebot or Bingbot does.
  • OpenAI, Anthropic and Perplexity run separate bots for search, so blocking their training crawlers doesn't remove you from their AI search results.
  • robots.txt is a request, not a lock. For bots that ignore it, enforce your rules at the server or firewall.
  • Expect changes to take about 24 hours, because crawlers cache robots.txt.

Why block AI crawlers in the first place?

Site owners usually block AI crawlers for one of three reasons. They don't want their writing, product data or photos used to train commercial models without permission. They're paying for the bandwidth and server load heavy crawlers create. Or they'd rather AI tools send them visitors than summarize their pages and keep the traffic.

There are also good reasons not to block everything. AI search products such as ChatGPT search and Perplexity cite and link to their sources, so blocking their search bots can cost you referrals. The useful question isn't "should I block AI?" It's "which AI bots, for which purpose?"

What are the different types of AI crawlers?

Most AI companies now split their traffic into separate user agents, which is what makes selective blocking possible.

Type What it does Examples Typical choice
Training crawler Collects pages that may be used to train AI models GPTBot, ClaudeBot, CCBot, Meta-ExternalAgent Block if you don't want your content used for training
AI search crawler Indexes pages so an AI search product can cite and link to them OAI-SearchBot, Claude-SearchBot, PerplexityBot Usually allow, because these bots send referral traffic
User-triggered fetcher Visits a page when a person asks an assistant about it ChatGPT-User, Claude-User, Perplexity-User Often can't be fully controlled with robots.txt

Two tokens work differently. Google-Extended and Applebot-Extended don't crawl anything themselves. They're control tokens. Google and Apple check them to decide whether content their normal crawlers already fetched may be used for AI.

Which AI crawler user agents should you know?

These are the tokens you put after User-agent: in robots.txt. Matching is case-insensitive under the Robots Exclusion Protocol (RFC 9309), but it's good practice to copy the spelling each operator documents.

Token Operator Purpose Follows robots.txt?
GPTBot OpenAI Training data for OpenAI's foundation models Yes (OpenAI)
OAI-SearchBot OpenAI Surfacing sites in ChatGPT search Yes
ChatGPT-User OpenAI Fetches pages for user requests in ChatGPT OpenAI says robots.txt rules "may not apply"
ClaudeBot Anthropic Training data for Anthropic's models Yes (Anthropic)
Claude-SearchBot Anthropic Improving Claude's search results Yes
Claude-User Anthropic Fetches pages when a Claude user asks Yes, per Anthropic
Google-Extended Google Gemini training and grounding (control token) Yes (Google)
Applebot-Extended Apple Training Apple's foundation models (control token) Yes (Apple)
CCBot Common Crawl Builds a free, open web archive anyone can use Yes, including Crawl-delay (Common Crawl)
PerplexityBot Perplexity Perplexity search index, not model training Yes (Perplexity)
Perplexity-User Perplexity Fetches pages for user questions Perplexity says it "generally ignores robots.txt rules"
Meta-ExternalAgent Meta AI development, including training foundation models Meta documents blocking it with robots.txt (Meta)
Meta-ExternalFetcher Meta User-requested fetches Meta says it "may bypass robots.txt"
Bytespider ByteDance Reportedly collects AI training data Disputed (Known Agents)

Bytespider deserves a note. ByteDance says it follows the robots exclusion standard. Some independent monitoring has reported it reaching disallowed pages, but spoofed user agents make the data hard to interpret. If you want it gone, block it at the server too.

How to block AI crawlers in robots.txt, step by step

  1. Find your robots.txt. It always lives at the root of your domain, for example https://example.com/robots.txt. WordPress generates a virtual one if no physical file exists. Uploading a real file to the web root replaces it.
  2. Decide your policy. Most businesses block training and allow AI search. Publishers who license content often block both.
  3. Add a group for the bots you want to block. One group can list several User-agent lines followed by its rules.
  4. Keep your search engine rules intact. Don't touch Googlebot or Bingbot, and never add Disallow: / under User-agent: * unless you want to vanish from search.
  5. Repeat shared rules in named groups. A crawler that matches a named group ignores the * group entirely. Google's documentation says its crawlers use only the most specific matching group. Any path you hide from everyone has to be repeated in each named group.
  6. Test and wait. Open the file in a browser, run it through a checker, and allow about 24 hours. RFC 9309 says crawlers should not rely on a cached copy for longer than that.

This is the balanced setup most small businesses want:

# Block AI model training
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: CCBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: Meta-ExternalAgent
User-agent: Bytespider
Disallow: /

# Allow AI search engines that cite and link to you
User-agent: OAI-SearchBot
User-agent: Claude-SearchBot
User-agent: PerplexityBot
Allow: /
Disallow: /wp-admin/

# Everyone else, including Googlebot and Bingbot
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php

Sitemap: https://example.com/sitemap.xml

The AI search group is optional. Without it, those bots would follow your * rules anyway. Listing them makes your intent obvious to the next person who edits the file.

Option B: block every AI bot that identifies itself

User-agent: GPTBot
User-agent: OAI-SearchBot
User-agent: ChatGPT-User
User-agent: ClaudeBot
User-agent: Claude-SearchBot
User-agent: Claude-User
User-agent: CCBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: PerplexityBot
User-agent: Perplexity-User
User-agent: Meta-ExternalAgent
User-agent: Meta-ExternalFetcher
User-agent: Bytespider
Disallow: /

Expect less visibility in ChatGPT search, Claude and Perplexity answers if you choose this. Some user-triggered fetchers may still visit, as the table above shows.

Want to skip hand-editing? The free robots.txt generator builds either setup for you.

Will blocking AI crawlers hurt your SEO?

Not if you block the right tokens. Here's how the major search engines handle it:

  • Google. Google says Google-Extended "does not impact a site's inclusion in Google Search nor is it used as a ranking signal in Google Search." It controls Gemini training and grounding in Gemini Apps and Vertex AI. AI Overviews and AI Mode work differently, because they're part of Search. According to Google's AI features documentation, the controls are Googlebot's robots.txt rules plus nosnippet, data-nosnippet, max-snippet and noindex. Those also change your regular search snippets, so use them sparingly. Google has also said it intends to support the IETF's AIPREF training-preference signal in early 2027, so watch for changes.
  • Apple. Apple says pages that disallow Applebot-Extended "can still be included in search results," and the rule isn't used for ranking. Only blocking Applebot itself affects Siri and Spotlight.
  • Bing. Bing doesn't use a separate AI user agent. In a 2023 announcement it said the NOCACHE and NOARCHIVE robots meta tags control how content is used in its chat answers and for training, and that pages with either tag still appear in search results.

The mistakes that do hurt SEO are familiar ones:

  • A blanket Disallow: / under User-agent: *.
  • Blocking CSS or JavaScript that Googlebot needs to render your pages.
  • Using robots.txt to try to remove pages from Google. Google says robots.txt "is not a mechanism for keeping a web page out of Google." Use noindex instead.

What if an AI bot ignores robots.txt?

robots.txt only works when the bot chooses to honor it. RFC 9309 states plainly that its rules "are not a form of access authorization." In August 2025, Cloudflare reported that it had seen undeclared crawlers fetching content from sites that disallowed Perplexity's declared bots. Cloudflare attributed those crawlers to Perplexity. For anything you truly need to keep out, add enforcement.

Block AI bots at the web server

On Nginx, you can return 403 Forbidden to specific user agents. Keep /robots.txt reachable, though. Anthropic notes that blocking its bots outright can stop them from reading your robots.txt, which makes your opt-out harder to honor.

# In the http {} block
map $http_user_agent $is_ai_bot {
    default 0;
    ~*(GPTBot|ClaudeBot|CCBot|Bytespider|Meta-ExternalAgent) 1;
}

# In your server {} block
location = /robots.txt {
    # Always let bots read your rules
    try_files $uri =404;
}

location / {
    if ($is_ai_bot) {
        return 403;
    }
    try_files $uri $uri/ /index.php?$args;
}

Adjust the final try_files line to match your existing configuration. The example above is a typical WordPress setup.

Verify bots instead of trusting the user agent

Any client can claim to be GPTBot, so user-agent rules stop honest bots and nothing more. Several operators publish IP ranges you can check against, including OpenAI (GPTBot, OAI-SearchBot, ChatGPT-User), Perplexity and Common Crawl. A web application firewall can match both user agent and source IP. It can also challenge or rate-limit bots that pretend to be browsers, something robots.txt can't do.

How to see which AI bots are crawling your site

Your access logs show who's visiting. This command counts requests from common AI user agents in a standard Nginx log:

grep -oiE "gptbot|oai-searchbot|chatgpt-user|claudebot|claude-user|claude-searchbot|ccbot|perplexitybot|perplexity-user|meta-externalagent|bytespider" /var/log/nginx/access.log \
  | tr '[:upper:]' '[:lower:]' | sort | uniq -c | sort -rn

Run it before and a few days after changing your rules. If a bot you disallowed keeps showing up, compare its IP addresses against the operator's published ranges. That tells you whether it's the real bot or an impersonator. To check what your robots.txt currently allows each AI bot to do, paste your domain into the AI crawler checker.

AI crawlers are only one piece of keeping a site healthy. If you run WordPress, our WordPress security checklist covers the rest. If you'd like to point AI tools toward your best content instead, read what llms.txt is and whether you need one.

Managing AI crawlers on Devma Hosting

Every Devma Hosting website plan includes free SSL and an AI-crawler opt-out toggle, so you can opt out of AI training crawlers without hand-editing robots.txt. If you need enforcement rather than a polite request, Security & AI Bot Protection adds an edge firewall, DDoS mitigation, malware scanning and per-bot controls to allow, block or rate-limit individual AI crawlers. It starts at $4.99 per site per month.

Frequently asked questions

Does blocking GPTBot remove my site from ChatGPT search?

No. OpenAI uses GPTBot for collecting training data and a separate bot, OAI-SearchBot, for ChatGPT search. You can disallow GPTBot and still allow OAI-SearchBot, and OpenAI treats the two settings independently.

Will blocking AI crawlers hurt my Google rankings?

Not if you leave Googlebot alone. Google says Google-Extended does not affect a site's inclusion in Google Search and is not used as a ranking signal. Your rankings only suffer if you accidentally block Googlebot, for example with a blanket 'Disallow: /' under 'User-agent: *'.

Do all AI crawlers respect robots.txt?

No. robots.txt is a voluntary standard, and the official spec says its rules are not a form of access authorization. Several operators say their user-triggered fetchers, such as ChatGPT-User, Perplexity-User and Meta-ExternalFetcher, may not follow it, so use server or firewall rules for anything you must keep out.

How long does it take for robots.txt changes to apply to AI bots?

Usually about a day. The robots.txt standard says crawlers should not use a cached copy for more than 24 hours, and OpenAI, Perplexity and Meta all describe roughly a 24-hour delay. Server-level blocks take effect immediately.

Abstract blue swirling shapes with light reflections

Ready when you are.

Pick a plan and launch today, or tell us what you run and we will size it with you.

Devma Hosting

AI assistant · replies in seconds

Hi there.
How can we help?

Ask about plans, moving your site, email or security. Answers come from our own guides, and a person is one tap away.

  • Message us on WhatsApp