hackerdb

Home / Guides / robots.txt for AI crawlers: which bots to allow and which to block

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

AI companies run several different kinds of crawler. Treating them all the same is the most common robots.txt mistake.

Published 2026-12-02. By hackerdb.

Three kinds of AI crawler

KindWhat it doesExample user-agent tokens*
SearchBuilds an index used to find sources for answersOAI-SearchBot, Claude-SearchBot, PerplexityBot
User-requested fetchLoads a page because a person asked an assistant about itChatGPT-User, Claude-User, Perplexity-User
Training / datasetCollects pages to train models or build datasetsGPTBot, ClaudeBot, CCBot; control tokens Google-Extended and Applebot-Extended

*Vendors rename and add tokens. Check each vendor's current crawler documentation before you deploy.

Decide two questions separately

Do you want to appear in AI answers? Then allow the search and user-requested crawlers. Do you want your content used for training? That is your call, and several vendors let you opt out without leaving their search products.

Example: be citable, opt out of training

User-agent: *
Allow: /

User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

User-agent: Google-Extended
Disallow: /

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

The default group allows everything else, including the search and fetch crawlers.

What robots.txt cannot do

Test it

Use the free checker: it shows, for each major AI and search crawler, whether your robots.txt allows the path you tested.