Skip to content

Guide

robots.txt for AI crawlers: allow or block GPTBot, ClaudeBot and more

By · Updated

Short answer

robots.txt is a plain text file at yoursite.com/robots.txt that tells robots which pages they may read. AI companies use separate robots (user agents) for search answers and for model training, so you can block training — for example “User-agent: GPTBot” then “Disallow: /” — while still letting OAI-SearchBot and PerplexityBot show your site in AI answers.

Key points

  • Each AI company runs more than one robot: one for live search answers, often one for user requests, and one for collecting training data.
  • GPTBot collects data to train OpenAI’s models; OAI-SearchBot is the one that lets ChatGPT search show and link your pages.
  • Blocking a training robot is a fair business choice and does not by itself remove you from AI search answers.
  • Blocking a search robot (OAI-SearchBot, PerplexityBot, Claude-SearchBot) means that assistant can’t read your pages to answer customers.
  • robots.txt is a polite request, not a lock. Firewalls and security plugins can block AI robots even when robots.txt allows them.

What does robots.txt do for AI crawlers?

Your robots.txt file (your site’s robot rules file) sits at the root of your website, for example www.example.in/robots.txt. Every well-behaved robot reads it before visiting your pages. Each block of rules starts with a “User-agent:” line naming the robot, followed by “Allow:” or “Disallow:” lines for the paths it may or may not read. The format is an internet standard, RFC 9309.

AI assistants such as ChatGPT, Claude, Perplexity and Gemini rely on robots (crawlers) to read the web. If your robots.txt blocks the wrong one, an assistant may not be able to read or link your pages when a customer asks about your type of business. If you have no robots.txt at all, every robot is allowed by default.

The fastest way to see what your current file says to each AI robot is our free AI crawler checker. Type your website address and it shows, robot by robot, which ones are allowed and which are blocked.

Which AI bot user agents should you know?

These are the names (user agent tokens) you write after “User-agent:”. The last column is the one that matters for your decision: robots marked “Search / answers” or “User request” bring your pages into AI answers; robots marked “Training” collect pages to train AI models.

User agent tokenCompanyWhat it doesType
OAI-SearchBotOpenAIFinds and links pages in ChatGPT searchSearch / answers
ChatGPT-UserOpenAIOpens a page when a ChatGPT user asks it toUser request
GPTBotOpenAICollects pages to train OpenAI modelsTraining
PerplexityBotPerplexityFinds and links pages in Perplexity answersSearch / answers
Perplexity-UserPerplexityOpens a page when a Perplexity user asksUser request
Claude-SearchBotAnthropicFinds pages for Claude’s search answersSearch / answers
Claude-UserAnthropicOpens a page when a Claude user asksUser request
ClaudeBotAnthropicCollects pages to train Anthropic modelsTraining
Google-ExtendedGoogleNot a separate robot: a token that controls Gemini training and grounding. Does not affect Google SearchTraining
Applebot-ExtendedAppleA token that controls Apple AI training (Applebot itself is Apple’s search robot)Training
CCBotCommon CrawlBuilds a public web archive that many AI models are trained onTraining
BingbotMicrosoftBing search, which also feeds Copilot answersSearch / answers
DuckAssistBotDuckDuckGoReads pages for DuckDuckGo’s AI answersSearch / answers
MistralAI-UserMistralOpens a page when a Le Chat user asksUser request
meta-externalagentMetaCollects pages for Meta’s AI models and productsTraining
AmazonbotAmazonReads pages for Amazon services such as Alexa answersSearch / answers
  • Names are not case-sensitive, but copy them exactly as shown to avoid typos.
  • Companies add and rename robots from time to time. Check the official pages (OpenAI’s “Overview of OpenAI crawlers” and Google’s “common crawlers” list) before you rely on a rule.

What is the full GPTBot user agent string?

In robots.txt you only write the short token (“User-agent: GPTBot”). The full user agent string is what shows up in your server logs when the robot visits. OpenAI documents these full strings for its three robots (the version numbers can change over time):

To be sure a visit really came from OpenAI and not from someone faking the name, check the visitor’s IP address against the lists OpenAI publishes at openai.com/gptbot.json, openai.com/searchbot.json and openai.com/chatgpt-user.json.

RobotFull user agent string (as documented by OpenAI)
GPTBotMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; GPTBot/1.4; +https://openai.com/gptbot
OAI-SearchBotMozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36; compatible; OAI-SearchBot/1.4; +https://openai.com/searchbot
ChatGPT-UserMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; ChatGPT-User/1.0; +https://openai.com/bot

What is the difference between blocking training and blocking answers?

Blocking a training robot (GPTBot, ClaudeBot, CCBot, Google-Extended, Applebot-Extended) asks that company not to use your pages to build future AI models. It does not take you out of today’s AI search answers, because those use different robots. Many businesses choose this to protect original writing, photos or paid content — and it is a perfectly fair choice.

Blocking a search or answer robot (OAI-SearchBot, PerplexityBot, Claude-SearchBot) is a different decision. That assistant can no longer read your pages when it searches the web for a customer, so it can’t quote or link you. For a small business that wants enquiries, this usually works against you.

Google is a special case. AI Overviews and AI Mode in Google Search use the normal Googlebot, so blocking Google-Extended does not remove you from them. Blocking Google-Extended can, however, reduce how your pages are used for grounding answers in the Gemini app. If you want to understand how AI assistants pick businesses to name, read what GEO is.

How do you allow all AI search bots? (copy-paste)

If you want every AI assistant to be able to read your public pages, the simplest file is below. Each item is one line of your robots.txt file. Replace example.in with your own domain.

  • The “*” group applies to every robot that has no group of its own, including all AI robots.
  • Keep private areas such as /admin/ or /cart/ disallowed for everyone.
  • If a robot has its own named group, it ignores the “*” group completely. So if your file already names GPTBot or PerplexityBot with “Disallow: /”, delete those lines too.
  1. User-agent: *
  2. Allow: /
  3. Disallow: /admin/
  4. Sitemap: https://www.example.in/sitemap.xml

How do you block AI training but stay in AI answers? (copy-paste)

This version asks the main training robots to stay out, while search and answer robots (OAI-SearchBot, PerplexityBot, Claude-SearchBot, Bingbot and Googlebot) still follow the open “*” group. Leave a blank line between groups.

  • Remove the Google-Extended lines if you want Gemini app answers to be able to use your pages for grounding.
  • Paste the finished file into our robots.txt tester and test a URL against GPTBot and OAI-SearchBot to confirm one is blocked and the other is allowed.
  1. User-agent: GPTBot
  2. Disallow: /
  3. User-agent: ClaudeBot
  4. Disallow: /
  5. User-agent: CCBot
  6. Disallow: /
  7. User-agent: Google-Extended
  8. Disallow: /
  9. User-agent: Applebot-Extended
  10. Disallow: /
  11. User-agent: meta-externalagent
  12. Disallow: /
  13. User-agent: *
  14. Allow: /
  15. Sitemap: https://www.example.in/sitemap.xml

How do you block just one AI bot, or one folder?

To block a single robot from the whole site, give it its own group. For example, to keep Common Crawl out while every other robot stays allowed:

  • To block GPTBot from one folder only — say, a paid course area — use “User-agent: GPTBot” followed by “Disallow: /courses/”.
  • To list several robots under the same rules, write one “User-agent:” line for each, one after another, then the shared “Disallow:” lines.
  • Never write “User-agent: *” followed by “Disallow: /” unless you want your whole site hidden from Google as well as AI.
  1. User-agent: CCBot
  2. Disallow: /
  3. User-agent: *
  4. Allow: /

Why might AI bots still be blocked when robots.txt allows them?

robots.txt only works for robots that choose to follow it, and it is not the only gate. Many sites block AI robots somewhere else without the owner knowing.

  • CDN and firewall settings: Cloudflare and other services offer “block AI bots” switches that turn away AI robots before they reach robots.txt.
  • WordPress security plugins: some block unknown or AI user agents by default.
  • Hosting “bot protection” on cheaper Indian and global shared hosting plans, which can return errors to robots.
  • A login wall, or content that only appears after JavaScript runs — many AI robots read the raw HTML only.

How do you check your robots.txt for AI crawlers?

Changes are not instant: robots fetch robots.txt from time to time, so allow a day or more before expecting a difference.

  1. Run the free AI crawler checker on your domain to see each AI robot’s status in one table.
  2. Edit robots.txt (in WordPress, Shopify or your hosting file manager), then test the new rules in the robots.txt tester.
  3. Check your CDN, firewall and security plugin settings for AI-bot blocking.
  4. Add an AI guide file so assistants can find your key pages quickly — see our llms.txt guide.
  5. Run the free website check: it reads your homepage and up to 4 main pages, checks AI crawler access in robots.txt, and scores your SEO, AEO, GEO and Brand.
  6. Then learn what else affects AI answers in how to rank on ChatGPT.

Frequently asked questions

What is the GPTBot user agent?

GPTBot is the robot OpenAI uses to collect public web pages that may be used to train its AI models. You control it in robots.txt with the line “User-agent: GPTBot”. In your server logs its full user agent string looks like “Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; GPTBot/1.4; +https://openai.com/gptbot”. It is separate from OAI-SearchBot, which powers ChatGPT search.

Does blocking GPTBot remove my site from ChatGPT?

No. Blocking GPTBot only opts you out of training. Whether ChatGPT search can show and link your pages depends on OAI-SearchBot, which you can keep allowed.

Does blocking Google-Extended remove me from AI Overviews?

No. Google says Google-Extended does not affect Google Search, and AI Overviews are part of Search. It controls Gemini model training and grounding in the Gemini app.

Do all AI bots obey robots.txt?

The major companies say their robots follow it, but robots.txt is a request, not a lock. To truly stop a robot you need a firewall or server rule.

Where is my robots.txt file?

It must be at the root of your domain, for example www.example.in/robots.txt. A robots.txt file inside a folder is ignored.

Sources

Check AI crawler access free

See your SEO, AEO and GEO scores.

Run the free website check — no sign-up — and get your top fixes in plain words.

7-day free trial. We can't promise a Google position — we measure honestly.