Robots.txt for AI Crawlers: A Copy-Ready Template
A robots.txt template for AI crawlers is a short file of rules, one group per bot, that says which AI crawlers may read your site. Copy one of four below, merge it with your existing file and test it.
What a Robots.txt Template for AI Crawlers Is
Robots.txt is a plain text file at the top level of your site. It asks crawlers which paths they may read. A robots.txt template for AI crawlers is that file with the rules for each AI bot already written, so you copy a block, swap the capital-letter parts and save it. No form. No email. Nothing to download. Just text.
Plenty of files we see fall into two camps. Nobody has opened theirs in a year, or somebody pasted a long list of bot names from a blog post and walked away, and the file has sat untouched through two redesigns and a change of web host. Sound familiar?
Decide First, Then Copy
A template can’t tell you whether to let a bot in, since that depends on whether your content is the product, what your client contracts say about reuse and how much you want to appear in AI answers when a buyer is researching vendors. Our guide on how to block AI crawlers by job, not by name walks through that call. This page is the file you write once the call is made. Wiring crawler access into a wider site health plan is part of our technical SEO services.
We checked every bot name below against its operator’s own page on November 25, 2026. Names change. Check the page again before your next edit. Every time.

Why Robots.txt for AI Crawlers Goes Wrong
Writing a Disallow line takes ten seconds. Writing the right one, for the right bot, and keeping it right as bots get renamed, added and retired over the next year is where it breaks. Fast to write. Slow to get right.
One Rule for Every Bot With AI in the Name
A blanket rule also shuts out the search bots. OpenAI’s crawler documentation says sites opted out of OAI-SearchBot won’t be shown in ChatGPT search answers. Training and search are separate switches. Treat them that way. Always.
The General Group Stops Applying
Google’s robots.txt specification says a crawler follows the group that matches its own name best and ignores the other groups. Once a bot has its own group, your lines under the star no longer reach it. Repeat the ones you still need. Easy to miss.
A List That Went Stale
OpenAI lists four bots on its page today and Anthropic lists three. A list copied last spring is already behind, and the file only covers the host it sits on, so a help center or docs subdomain needs its own.
The Robots.txt Template for AI Crawlers
Four templates, one for each decision. Pick one, replace every capital-letter part and keep everything else. Each starts with a general group, so paste the rules you already have there and don’t overwrite your file. Swap the example.com address for your own.
| Operator | Token | Job | What the operator says |
|---|---|---|---|
| OpenAI | GPTBot | Training | Disallowing it signals that content should not be used to train its models |
| OpenAI | OAI-SearchBot | Search | Sites opted out of it won’t be shown in ChatGPT search answers |
| OpenAI | ChatGPT-User | A person’s request | Robots.txt rules may not apply |
| Anthropic | ClaudeBot | Training | Honors robots.txt, and each subdomain needs its own rule |
| Anthropic | Claude-SearchBot | Search | Honors robots.txt |
| Anthropic | Claude-User | A person’s request | Honors robots.txt |
| Perplexity | PerplexityBot | Search | Not used for training, and Perplexity recommends allowing it |
| Perplexity | Perplexity-User | A person’s request | Generally ignores robots.txt |
| Google-Extended | Control token for Gemini training and grounding | No effect on inclusion in Google Search or ranking | |
| Apple | Applebot-Extended | Control token for Apple model training | Doesn’t crawl, and disallowing it doesn’t remove you from Apple search |
| Common Crawl | CCBot | Open web crawl data | Opt out with a Disallow rule |
| Meta | meta-externalagent | Training or indexing | Add a Disallow rule to block it |
| Meta | meta-externalfetcher | A person’s request | May bypass robots.txt rules |
| Amazon | Amazonbot | Product improvement, may train AI models | Respects the Robots Exclusion Protocol |
Sources are the operators’ own pages, including OpenAI, Anthropic, Perplexity, Google and Apple. Googlebot and Bingbot don’t appear in these templates on purpose. Leave them alone.
Template 1, Every AI Bot Allowed
Use this when you want to be found and you have no objection to training. Allowing is the default, so these lines change nothing. We still write them down. The next person who opens the file can see the intent.
# Template 1, every AI bot allowed. Reviewed on YYYY-MM-DD by NAME. # KEEP YOUR EXISTING GENERAL RULES HERE User-agent: * Disallow: /PRIVATE-FOLDER/ # Search bots User-agent: OAI-SearchBot User-agent: Claude-SearchBot User-agent: PerplexityBot Allow: / # Training bots and control tokens User-agent: GPTBot User-agent: ClaudeBot User-agent: Google-Extended User-agent: Applebot-Extended Allow: / # Bots that fetch a page because a person asked User-agent: ChatGPT-User User-agent: Claude-User User-agent: Perplexity-User Allow: / Sitemap: https://www.example.com/sitemap.xml
Template 2, Search Bots In, Training Bots Out
The usual middle path for a marketing site. The search bots stay in so AI answers can find and link your pages, and the training bots and control tokens are opted out. Anthropic, Apple, Meta and Amazon each describe what their bot does on their own pages, so read them before you keep every line.
# Template 2, search bots in, training bots out. Reviewed on YYYY-MM-DD by NAME. # KEEP YOUR EXISTING GENERAL RULES HERE User-agent: * Disallow: /PRIVATE-FOLDER/ # Search bots stay in so AI answers can find and link your pages User-agent: OAI-SearchBot User-agent: Claude-SearchBot User-agent: PerplexityBot Allow: / # Training bots and control tokens, opted out User-agent: GPTBot User-agent: ClaudeBot User-agent: Google-Extended User-agent: Applebot-Extended User-agent: CCBot User-agent: meta-externalagent User-agent: Amazonbot Disallow: / Sitemap: https://www.example.com/sitemap.xml
Template 3, Every Named AI Bot Out
The strict version. It also takes you out of the AI search answers those bots power, and it can’t stop a fetcher that ignores the file. Choose it with your eyes open. Not ideal for a site that wants leads. Our block-or-allow guide weighs the cost.
# Template 3, every named AI bot out. Reviewed on YYYY-MM-DD by NAME. # This also removes you from the AI search answers those bots power. # KEEP YOUR EXISTING GENERAL RULES HERE User-agent: * Disallow: /PRIVATE-FOLDER/ # Search bots User-agent: OAI-SearchBot User-agent: Claude-SearchBot User-agent: PerplexityBot Disallow: / # Training bots and control tokens User-agent: GPTBot User-agent: ClaudeBot User-agent: Google-Extended User-agent: Applebot-Extended User-agent: CCBot User-agent: meta-externalagent User-agent: Amazonbot Disallow: / # Page fetchers. Some may ignore this file, so private pages still need a login. User-agent: ChatGPT-User User-agent: Claude-User User-agent: Perplexity-User User-agent: meta-externalfetcher Disallow: / Sitemap: https://www.example.com/sitemap.xml
Template 4, One Folder Out
Paid research, client reports or licensed data can stay out of training while everything else stays open. List the folders and leave the rest alone. Notice the comment about the general group. This is where people get caught.
# Template 4, training bots out of one folder only. Reviewed on YYYY-MM-DD by NAME. # KEEP YOUR EXISTING GENERAL RULES HERE User-agent: * Disallow: /PRIVATE-FOLDER/ # A bot with its own group ignores the * group above, so repeat any general rules you still need here. User-agent: GPTBot User-agent: ClaudeBot User-agent: Google-Extended User-agent: Applebot-Extended User-agent: CCBot User-agent: meta-externalagent User-agent: Amazonbot Disallow: /PRIVATE-FOLDER/ Disallow: /PAID-RESEARCH-FOLDER/ Disallow: /CLIENT-REPORTS-FOLDER/ Sitemap: https://www.example.com/sitemap.xml
Replace every capital-letter part before you save. Then load the live file in a browser and read it top to bottom.

How to Read a Robots.txt Group
A group starts with one or more User-agent lines that name the bots, then Allow and Disallow lines that give the paths. A blank line ends it. Disallow with a single slash means the whole site. Allow with a single slash means nothing is off limits. Two lines. Opposite results.
Several bots can share one group, which is how the templates stay short. Comments start with a pound sign and crawlers skip them, so use them to say who owns the file and when somebody last checked it.
The format is public. The Robots Exclusion Protocol, RFC 9309, sets it out, and it says plainly that robots.txt is not a form of access authorization. Keep that in mind.
Four Rules the Robots.txt Templates Follow
Each rule comes from an operator’s own documentation, and we link it. A rule you can’t check is just an opinion.
One File for Each Host
Google says the file goes in the top-level directory and applies only to the host, protocol and port it sits on, and Anthropic asks site owners to do the same for every subdomain.
The Specific Group Wins
A crawler follows the closest-matching group for its name and ignores the rest, per Google’s specification. So Template 4 repeats the general rules inside the bot group.
Plain Text, Kept Small
The file must be UTF-8 plain text, and Google reads only the first 500 kibibytes of it. Four templates are far under that. A file with thousands of lines is not, and a file that big usually means somebody pasted a bot list nobody has reviewed in years.
Changes Take About a Day
OpenAI says a change can take about 24 hours to reach its systems. Perplexity says up to 24 hours, and Google caches the file for up to a day. Check in a few days. Not the same afternoon.
How to Add the Robots.txt Template to Your Site
Read the live file. Pick a template. Merge. Check it. Done.
Read and Save the Live File
Open yourdomain.com/robots.txt in a browser and read it top to bottom. Save a copy before you touch anything. Look for a leftover Disallow from a staging site or a rule nobody owns. Both turn up a lot.
Pick the Template That Matches Your Decision
Not sure which one? Start with our guide to blocking AI crawlers. It sorts bots by job and explains what each choice costs.
Merge It, Don’t Replace It
Keep your existing rules and your sitemap line, because a file that drops the sitemap reference or the rules your developer added for admin pages and internal search can quietly cause a different problem a month later. Swap every capital-letter part. If a bot gets its own group, copy any general Disallow lines into that group too.
Save, Reload and Watch the Logs
Upload the file, reload the live URL and repeat the check on each subdomain. A few days later, look for the bot names in your server logs and match what you see against the operator’s published IP list, such as OpenAI’s or Anthropic’s.
Check the File Before It Goes Live
Run the finished file through these nine checks. One miss takes a minute to fix. Three misses mean it isn’t ready. Simple.
- A copy of the old file is saved
- Every capital-letter part has been replaced
- No search bot you want sits in a Disallow group
- General Disallow lines are repeated inside any bot group
- The sitemap line points at the live sitemap
- The file is saved as plain UTF-8 text
- Every subdomain has been checked
- Firewall and CDN settings let the allowed bots through
- A recheck is on the calendar
A Disallow line is a polite sign on an unlocked door. Client portals, gated reports, staging sites and anything under an NDA need a login. Not a line in a text file.

Edit It Yourself, or Hand It Off
Plenty of teams stop here. That’s fine. If you’d rather have the file written, tested and rechecked by someone else, our technical SEO services page shows how we work, and our generative engine optimization services cover what happens once the bots can reach you.
Want a quick read on whether AI tools already mention you? Try the AI visibility checker. Hiring someone to rebuild the site? Put crawler access in writing with our website RFP template.
Robots.txt Is One File of Several
An llms.txt file has a separate job, and our guide to building an llms.txt file for your MSP website covers it. Page-level markup is another, and our schema markup templates are copy-ready too. The rest of the checklist lives in our technical SEO checklist for MSP websites.
Who This Template Suits
- An owner, marketing lead or web manager at a US MSP, IT services firm, VAR or telecom provider with up to $50M in revenue
- Someone who can edit the robots.txt file, or ask a developer or host to
- A team that has already decided which bots to allow
- A person who’ll reload the file and check it after saving
- You want the decision made for you, which is what our guide to blocking AI crawlers is for
- You want private pages protected, which takes a login and not a text file
- You want a promise of AI citations, which no robots.txt file can give
- You want a tool that writes the file from a form
Questions About Robots.txt for AI Crawlers
What is a robots.txt template for AI crawlers?
It’s a robots.txt file with the rules for each AI bot already written, so you swap in your own paths and save it. Each bot gets its own group, because the operators run separate bots for training, search and page fetching.
Which AI crawler user agents should be in robots.txt?
The ones you want to control on purpose. Start with GPTBot, OAI-SearchBot, ClaudeBot, Claude-SearchBot, PerplexityBot and Google-Extended, then add Applebot-Extended, CCBot or meta-externalagent if training is your concern. Our table above names the job for each.
How do I block GPTBot but stay in ChatGPT search?
Disallow GPTBot and leave OAI-SearchBot alone. OpenAI says each setting is independent, so a site can allow OAI-SearchBot to appear in search results while disallowing GPTBot. See OpenAI’s crawler documentation.
Does robots.txt actually stop ClaudeBot?
Anthropic says its bots honor robots.txt. A Disallow line for ClaudeBot works, and it needs to sit on every subdomain you want covered. Anthropic also warns that blocking IP addresses instead may not give a lasting opt-out. Details are on its help page.
Will Google-Extended hurt my rankings?
No. Google says Google-Extended doesn’t affect inclusion in Google Search and isn’t a ranking signal. It only controls whether crawled content may be used for Gemini training and grounding. Googlebot is the control for Search itself, per Google’s crawler list.
Where does robots.txt go, and how long does a change take?
In the top-level directory of each host, at yourdomain.com/robots.txt. Give a change about 24 hours, which is what OpenAI and Perplexity both quote. Then check your server logs a few days later rather than the same afternoon.
Is robots.txt enough to keep private pages away from AI tools?
No. It’s a request, not a lock, and the standard itself says the file is not access authorization. OpenAI says robots.txt rules may not apply to ChatGPT-User and Perplexity says Perplexity-User generally ignores them. Put private pages behind a login. Always.
Want a Second Set of Eyes on the File?
Bring your robots.txt. We’ll read it alongside your firewall and subdomains and tell you what to change first.