Home Learn Stage 3

robots.txt for AI bots

robots.txt is the small file on your site that tells bots what they may read. For AI you make a separate choice for each bot, so you can stay out of training and still appear in AI search.

Read the 3 best sources

Stage 3: Get found

Topic 2 of 7

In short

  • Rules are per bot. Allowing search bots and blocking training bots is a normal setup.
  • Bots that fetch a page because a user asked may not follow robots.txt at all.
  • A change can take about a day to show up in ChatGPT search.

Stay in AI search, stay out of training

# Search and answer bots: allowed
User-agent: OAI-SearchBot
Allow: /

User-agent: Claude-SearchBot
Allow: /

User-agent: PerplexityBot
Allow: /

# Training bots: blocked
User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Disallow: /
Source: An example built from the OpenAI and Anthropic documentation. Decide for your own site.

Go deeper

The best sources we found on this topic. Each opens on the publisher’s site.