Sub topic 2
Training, AI Search, and User-Initiated Fetches
This chapter assumes you understand HTTP requests, the User-Agent header, web crawlers, and basic robots.txt editing. It also assumes you can read simple Python and use curl.
A crawler's purpose matters because allowing one kind of fetch does not require allowing every kind. AI-related crawlers generally fall into three groups:
- Training crawlers collect pages for datasets used to train or improve models.
- AI search crawlers fetch pages for a search index or retrieval system that helps answer current questions.
- User-initiated fetchers retrieve a page because a person asked an AI product to inspect that URL or topic.
The same website may want different policies for each group.
How the purposes differ
Training is usually a bulk collection activity. A crawler may visit many pages without an immediate user request. The content can later influence a model's general behavior, but it may not produce a direct citation or link to the page.
AI search fetches are closer to conventional search indexing. The crawler gathers content so an AI answer can find, summarize, and sometimes cite the page. Blocking this crawler can reduce visibility in that product's answers. Allowing it can create a new discovery channel without necessarily allowing model training.
A user-initiated fetch is tied to a particular interaction. For example, a user might give an AI assistant a URL and ask for a summary. The fetcher needs access at that moment. Blocking it prevents that request from completing, even if the site remains available to normal search crawlers.
Recognizing common crawler identities
The User-Agent token is the name a crawler presents in its HTTP request. Common examples include:
| Purpose | Common token | Policy question |
|---|---|---|
| Model training | `GPTBot` | Should OpenAI use pages for training? |
| AI search | `OAI-SearchBot` | Should OpenAI search answers discover the site? |
| User-initiated fetching | `ChatGPT-User` | Should a user's requested fetch work? |
| Google generative products | `Google-Extended` | Should Google use content for certain AI systems? |
GPTBot, ClaudeBot, CCBot, and Applebot-Extended are commonly associated with training or extended data-use controls. PerplexityBot is associated with AI search. These purposes and product policies can change, so verify the current documentation before making a permanent rule.
Google-Extended is a control token for Google's generative AI use. It is separate from Googlebot. Blocking Google-Extended does not block Google Search crawling, indexing, or ranking. A rule for Google-Extended therefore expresses a data-use choice rather than a general Google visibility choice.
Choosing a policy
Start with the result you want:
- To prevent training while keeping AI search visibility, block training tokens and allow search tokens.
- To maximize AI answer visibility, allow the relevant search crawler and decide separately whether user fetches should work.
- To keep content out of a specific AI product, block that product's token.
- To protect private or draft content, use authentication.
robots.txtis not an access-control system.
A practical policy can be asymmetric. For example, a publisher might disallow GPTBot and ClaudeBot, allow OAI-SearchBot and PerplexityBot, and allow ChatGPT-User so readers can request summaries. That policy depends on the publisher accepting user-requested retrieval while refusing model-training collection.
Test the distinction before deployment
Represent the intended policy as data and test representative agents. This catches accidental rules such as a broad wildcard block that overrides the visibility you intended to keep.
from urllib.robotparser import RobotFileParser
rules = """\
User-agent: GPTBot
Disallow: /
User-agent: OAI-SearchBot
Allow: /
User-agent: ChatGPT-User
Allow: /
User-agent: *
Allow: /
"""
parser = RobotFileParser()
parser.parse(rules.splitlines())
url = "https://example.com/articles/guide"
for agent in ["GPTBot", "OAI-SearchBot", "ChatGPT-User", "OtherBot"]:
print(f"{agent}: {parser.can_fetch(agent, url)}")This test checks access decisions, not the crawler's real-world purpose. After choosing the policy, write correctly scoped groups, verify the live file, and monitor logs. The next chapter covers the OpenAI-specific tokens in more detail.
Exercise
A site wants to block model-training collection but remain discoverable in AI search and allow a user to submit a URL to an assistant. Which categories should it distinguish?
Show answer
It should distinguish training crawlers from AI search crawlers and user-initiated fetchers, then apply separate rules to each category.