The short answer
Add a block of rules to your site's robots.txt file for each AI crawler you want to stop, and leave search crawlers such as Googlebot and Bingbot allowed. The most common choice is to block crawlers that collect content for AI training, while keeping search crawlers so you still get traffic.
robots.txt is a polite request, not a lock. The major AI companies say they follow it, but bots that ignore it need server-level blocking.
Training crawlers versus search crawlers
AI companies now run several kinds of bots, and blocking them has different effects:
| Type | What it does | Effect of blocking |
|---|---|---|
| Training crawlers | Collect pages to train AI models | Your content is not used in future training by that company |
| AI search crawlers | Fetch pages to answer questions and cite sources | You may stop appearing, and being linked, in that AI's search answers |
| User-triggered fetchers | Fetch a page because a user asked the AI to read it | That AI cannot open your page when a user asks it to |
| Search engine crawlers (Googlebot, Bingbot) | Index your site for search | You disappear from search results. Do not block these. |
The main AI crawler names
These are the user-agent tokens you write in robots.txt. Companies add new ones, so check each company's documentation from time to time.
| Company | Training | Search / user requests |
|---|---|---|
| OpenAI | GPTBot | OAI-SearchBot, ChatGPT-User |
| Anthropic | ClaudeBot | Claude-SearchBot, Claude-User |
Google-Extended (a control token, not a separate crawler) | Uses Googlebot for Search | |
| Apple | Applebot-Extended | Uses Applebot for Siri and Spotlight |
| Perplexity | — | PerplexityBot, Perplexity-User |
| Common Crawl | CCBot (its open dataset is widely used for AI training) | — |
| Meta | Meta-ExternalAgent | — |
| Amazon | Amazonbot | — |
| ByteDance | Bytespider | — |
Step 1: Find or create your robots.txt
robots.txt must sit at the root of your domain, for example https://example.com/robots.txt. Open that address in a browser to see whether you already have one.
- WordPress: an SEO plugin such as Yoast or Rank Math lets you edit it, or upload a file to the site root.
- Next.js, Astro and similar frameworks: add
robots.txtto thepublicfolder, or generate it with the framework's robots feature. - Shopify, Squarespace and Wix: each has its own settings for robots.txt or AI crawlers. Check the platform's help pages.
Step 2: Add the rules
This blocks the main training crawlers while leaving search alone:
# Block AI training crawlers
User-agent: GPTBot
Disallow: /
User-agent: ClaudeBot
Disallow: /
User-agent: Google-Extended
Disallow: /
User-agent: Applebot-Extended
Disallow: /
User-agent: CCBot
Disallow: /
User-agent: Meta-ExternalAgent
Disallow: /
User-agent: Bytespider
Disallow: /
# Everyone else, including Googlebot and Bingbot, may crawl
User-agent: *
Allow: /
To also stay out of AI search answers, add OAI-SearchBot, Claude-SearchBot and PerplexityBot to the blocked list.
To block AI crawlers from one section only, for example paid content, use a path instead of /:
User-agent: GPTBot
Disallow: /members/
Step 3: Check it works
- Open your robots.txt in a browser and check the rules are there with no typos. User-agent names are not case-sensitive, but paths are.
- Check Google Search Console's robots.txt report (under Settings). It shows whether Google can read your file and flags errors. The old standalone robots.txt tester has been retired.
- Watch your server logs for a few weeks. Blocked bots that respect robots.txt stop fetching pages other than robots.txt itself.
Common mistakes
- Blocking Googlebot or Bingbot. That removes you from search results. Block only AI-specific tokens.
- A typo that blocks everything.
User-agent: *followed byDisallow: /blocks every crawler, including search engines. - Expecting instant removal. Blocking stops future crawling. It does not remove content already collected or used in training.
- Relying on
Crawl-delay. Many crawlers, including Googlebot, ignore it. - Treating robots.txt as security. The file is public and only well-behaved bots obey it. Never use it to hide private pages. Protect those with a login.
When robots.txt is not enough
For bots that ignore robots.txt, block them on the server:
- CDN and firewall bot controls. Cloudflare and other providers offer one-click AI-bot blocking and bot-management rules.
- Server rules that return an error to specific user agents. Determined scrapers can fake their user agent, so CDN-level bot detection is more reliable.
- Rate limiting, which slows any client that requests too many pages too fast.
Key takeaways
- Block AI crawlers by name:
GPTBot,ClaudeBot,Google-Extended,CCBotand others. - Never block Googlebot or Bingbot unless you want to leave search.
- Decide separately whether to block AI search crawlers, which can send you traffic.
- robots.txt is a request. Use CDN or server-level blocking for bots that ignore it.