All articles

SEO & AI SEARCH

robots.txt and AI bots: which to allow and which to block

Your robots.txt file is a short text file that tells crawlers where they may go. For years it mostly concerned Google and Bing. Now it also decides whether ChatGPT, Claude and Perplexity can find you, and many sites get it wrong without realizing.

Ana Maria Tudorache2 min read

Not all AI bots do the same job

The most important thing to understand is that each AI company runs several bots with different purposes. Broadly, there are three kinds:

Bot typeWhat it doesExamples
Search botsIndex your pages so AI tools can cite and link you in answersOAI-SearchBot, Claude-SearchBot, PerplexityBot
Training botsCollect content to train future AI modelsGPTBot, ClaudeBot
User fetchersVisit a page live because a person asked the AI about itChatGPT-User, Claude-User, Perplexity-User

The companies document this themselves. OpenAI recommends allowing OAI-SearchBot if you want to appear in ChatGPT search results. Anthropic says blocking Claude-SearchBot may reduce your visibility in its search results. Perplexity recommends allowing PerplexityBot to appear in its results.

One detail surprises people: user fetchers may not follow robots.txt at all. OpenAI and Perplexity both note that because a person requested the visit, robots.txt rules may not apply.

The common mistake

Some robots.txt files block every bot with "AI" or "GPT" in its name. That feels safe, but it often blocks search visibility along with training. You end up protected from training, and also invisible in AI answers.

A balanced example

If you want to appear in AI search but prefer not to be used for training, a starting point looks like this:

User-agent: OAI-SearchBot
Allow: /

User-agent: Claude-SearchBot
Allow: /

User-agent: PerplexityBot
Allow: /

User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

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

If you want maximum visibility, you can simply allow all of them. Both are valid choices. What matters is that you choose on purpose.

How to check yours in five minutes

  • Type yoursite.com/robots.txt into your browser.
  • Look for lines starting with User-agent and Disallow.
  • Check whether any search bot from the table above is disallowed.
  • Check for a catch-all rule (User-agent: *) with Disallow: /, which blocks everyone.
  • If you use Cloudflare or a similar service, check its AI bot settings too, since they can block bots before robots.txt is even read.

A small file, but it is the front door. If AI search bots cannot get in, nothing else in your SEO work reaches them.

Related: Why your website needs an audit for the new search engines

Sources

OpenAI, Overview of OpenAI Crawlers

Anthropic, Does Anthropic crawl the web and how can site owners block the crawler?

Perplexity, Perplexity Crawlers