Free resource
AI Crawler robots.txt Templates: Allow Search Bots, Block Training
To block AI crawlers in robots.txt without disappearing from AI search, you need to treat two kinds of bots differently. Search bots (like OpenAI's OAI-SearchBot) decide whether you can appear in ChatGPT, Claude or Perplexity answers. Training bots (like GPTBot) collect content to build future AI models. You can block the second group and keep the first, and the templates below do exactly that.
Every user agent here was checked against the company's own documentation in October 2026. Copy the template that fits, change the sitemap line, and upload it.
If you'd rather have someone check your crawler access, firewall included, the AI search questionnaire takes a few minutes. I reply with a plan and a fixed quote within one business day.
Who this is for
- Owners who heard "block the AI bots" and want to do it without hiding from ChatGPT.
- Web people tidying up a robots.txt that grew by copy-paste over the years.
- Anyone who added a plugin's AI blocking and isn't sure what it actually blocked.
robots.txt (a plain-text file at yoursite.com/robots.txt telling crawlers what they may visit) is a request, not a lock. The big AI companies say their crawlers follow it. Bots that ignore it need a firewall rule instead.
The AI crawler list (checked October 2026)
| Company | User agent | What it does | Template 1 setting |
|---|---|---|---|
| OpenAI | OAI-SearchBot | Indexes pages for ChatGPT search | Allow |
| OpenAI | ChatGPT-User | Fetches a page when a user asks | Allow |
| OpenAI | GPTBot | Collects content that may train models | Block |
| Anthropic | Claude-SearchBot | Indexes pages for Claude's search | Allow |
| Anthropic | Claude-User | Fetches a page when a Claude user asks | Allow |
| Anthropic | ClaudeBot | Collects content that may train models | Block |
| Perplexity | PerplexityBot | Indexes pages for Perplexity answers | Allow |
| Perplexity | Perplexity-User | Fetches a page when a user asks | Allow |
| Googlebot | Google Search, including AI Overviews | Never block | |
| Google-Extended | Gemini training and Gemini app grounding | See note | |
| Apple | Applebot-Extended | Apple AI training opt-out (doesn't crawl) | Block |
| Common Crawl | CCBot | Open web archive used by many AI labs | Block |
| Microsoft | Bingbot | Bing, Copilot and Bing AI answers | Never block |
Sources for each row: OpenAI's crawler docs, Anthropic's crawler help page, Perplexity's bot guide, Google's common crawlers page, Apple's Applebot page, and CCBot from Cloudflare's managed robots.txt list.
Three notes that trip people up:
- Google-Extended is not just training. Google says it controls whether your content is used to train Gemini and to ground answers in the Gemini apps. It does not affect Google Search or rankings. Block it and you may show up less in Gemini app answers.
- The "-User" bots may ignore robots.txt. OpenAI says robots.txt rules "may not apply" to ChatGPT-User, and Perplexity says Perplexity-User "generally ignores robots.txt rules", because a person asked for that page. Blocking them in robots.txt is mostly symbolic.
- Microsoft has no separate AI crawler. Copilot uses Bingbot. To limit AI use, Bing uses page-level tags instead (see the Microsoft section below).
How robots.txt groups work (read this before you paste)
One rule catches almost everyone. A crawler follows only the single most specific group that names it, and ignores the User-agent: * group. Google's robots.txt rules put it this way: "Only one group is valid for a particular crawler."
So if your file says:
# Everyone stays out of the admin area...
User-agent: *
Disallow: /wp-admin/
# ...except this bot, which now ignores the line above.
User-agent: OAI-SearchBot
Allow: /OAI-SearchBot will happily crawl /wp-admin/. Repeat any shared rules inside each named group, which is what the templates below do. User-agent names are not case-sensitive, and the order of groups doesn't matter.
Which template to block AI crawlers should you pick?
Answer two questions: do you want customers to find you through AI answers, and do you mind your public pages being used to train AI models?
| Your situation | Use | Why |
|---|---|---|
| Local business or service company, mildly uneasy about training | Template 1 | Stays visible in ChatGPT, Claude and Perplexity, opts out of the main training crawlers |
| Local business, don't care about training | Template 2 | Simplest file, nothing to maintain |
| Publisher, course creator or anyone whose content is the product | Template 3 | Opts out of more training crawlers, accepts a small Gemini trade-off |
| Paywalled or members-only content | Template 4 | Nothing public to be found anyway |
For contractors, clinics, law firms and local retailers, I'd suggest Template 1 or 2. Their pages exist to be found. A plumber's service page being used in training doesn't cost the plumber anything, while missing from ChatGPT's answer to "emergency plumber near me" might.
One more honest point: blocking training crawlers today doesn't remove content they already collected. It only applies going forward. Anthropic, for example, describes blocking ClaudeBot as a signal to leave your future material out of its training data.
Template 1: Visible in AI search, opted out of training (my default)
# Template 1: allow AI search and user fetches, opt out of AI training.
# Could break: nothing in Google or Bing. Gemini app answers still work (Google-Extended allowed).
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
User-agent: OAI-SearchBot
User-agent: ChatGPT-User
User-agent: Claude-SearchBot
User-agent: Claude-User
User-agent: PerplexityBot
User-agent: Perplexity-User
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Applebot-Extended
User-agent: CCBot
Disallow: /
Sitemap: https://example.com/sitemap.xmlThe search bots would follow the * group anyway. Naming them is insurance: if someone later tightens the * group, your AI search visibility doesn't go with it. If your site isn't WordPress, swap the /wp-admin/ lines for your own private paths.
Template 2: Open door
# Template 2: allow everything except private paths.
# Could break: nothing. Your content may be used for AI training.
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
Sitemap: https://example.com/sitemap.xmlFine for most small businesses that don't mind training. Your pages are marketing, after all.
Template 3: Strict training opt-out
# Template 3: Template 1 plus Google-Extended and other training crawlers.
# Could break: you may appear less in Gemini app answers. Google Search is unaffected.
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
User-agent: OAI-SearchBot
User-agent: ChatGPT-User
User-agent: Claude-SearchBot
User-agent: Claude-User
User-agent: PerplexityBot
User-agent: Perplexity-User
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: CCBot
User-agent: Bytespider
User-agent: Amazonbot
User-agent: meta-externalagent
Disallow: /
Sitemap: https://example.com/sitemap.xmlBytespider, Amazonbot and meta-externalagent come from the training-crawler list in Cloudflare's managed robots.txt. Those companies may use the same bots for other products, so this is the template for publishers who care more about training than reach.
Template 4: Block all AI, search included (think twice)
# Template 4: block AI search, AI fetches and AI training.
# Could break: you won't appear in ChatGPT search answers, Claude search or Perplexity.
User-agent: OAI-SearchBot
User-agent: ChatGPT-User
User-agent: GPTBot
User-agent: Claude-SearchBot
User-agent: Claude-User
User-agent: ClaudeBot
User-agent: PerplexityBot
User-agent: Perplexity-User
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: CCBot
Disallow: /
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
Sitemap: https://example.com/sitemap.xmlOpenAI says sites opted out of OAI-SearchBot "will not be shown in ChatGPT search answers." For a business that wants customers, I'd rarely recommend this one. It makes sense for paywalled publishers and private member sites.
Microsoft and Copilot: use meta tags, not robots.txt
Blocking Bingbot removes you from Bing, Copilot and everything built on Bing's index. That's too big a hammer. Instead, Bing reads two page-level tags, described in its Bing Chat content controls announcement:
<!-- Copilot may cite the page, but only shows the URL, title and snippet. -->
<!-- Could break: richer Copilot citations. Normal Bing results are unaffected. -->
<meta name="robots" content="nocache">noarchive goes further and keeps the page out of Copilot answers and Microsoft's model training entirely. For most businesses, neither is needed.
How to install and test your robots.txt
- Find the current file. Visit yoursite.com/robots.txt. On WordPress, Yoast SEO and Rank Math can generate it, so edit it in the plugin's robots.txt editor. Otherwise, it's a file in your site's root folder (
public_htmlon cPanel). - Back it up. Copy the old version into a text file before you change anything.
- Paste your template and change the sitemap URL.
- Check the live version, because Cloudflare's managed robots.txt can add its own lines above yours:
# Shows the robots.txt bots actually receive. Read-only.
curl -s https://example.com/robots.txt- Check Google can read it in Search Console under Settings, then the robots.txt report. A file that returns a server error makes Google pause crawling, so this matters more than the AI lines.
- Wait a day. OpenAI says changes can take about 24 hours to register.
When robots.txt isn't enough
robots.txt only works on bots that choose to obey it, and it only works if bots can reach it. A firewall or Cloudflare setting can block OAI-SearchBot before it ever reads the file. If your robots.txt looks right and ChatGPT still can't see you, check whether Cloudflare is blocking ChatGPT next.
And robots.txt is one piece of a bigger picture. Being cited also takes consistent business details, real mentions and pages worth quoting. I cover all of it in the owner's guide to AI search optimization. My free small-site check also tests AI crawler access, with a report within two business days.
When to call a pro
Call someone if your robots.txt has more than a few dozen lines nobody can explain, if you run several subdomains or languages, or if the site sits behind Cloudflare and a security plugin at once. Those are the setups where one wrong line blocks something you didn't mean to.
That's the work in my AI search work: crawler access, firewall rules, entity consistency and Bing's AI report, set up and checked. Tell me about your site and I'll reply with a fixed quote. No pressure either way.
Want a second pair of eyes on your site?
Tell me what's going on in the ai search optimization questionnaire. I reply with a plan and a fixed quote within one business day.