# AI crawler policy generator: robots.txt, TDMRep and ai.txt for AI

The AI crawler policy generator writes a website's AI-use preferences into the files AI crawlers and agents read: robots.txt groups for each AI user agent (OpenAI, Anthropic, Google, Apple, Perplexity, Common Crawl, ByteDance, Meta, Amazon, xAI), Content Signals, a W3C TDMRep file for the text-and-data-mining reservation, ai.txt, and the matching HTTP headers and meta tag. Three choices drive it: whether AI search engines may index and cite the site, whether agents may fetch pages a person asked them to read, and whether AI developers may train on the content. Free, no key.

These files state preferences that well-behaved crawlers follow; they do not technically stop a crawler that ignores them, and they are not a license. Publish them, then confirm what crawlers will read with read_ai_policy (GET /v1/ai-policy?domain=your-site).

## Run it

    curl -s "https://www.rightshold.com/v1/ai-policy/generate?search=yes&user_fetch=yes&training=no"

POST https://www.rightshold.com/v1/ai-policy/generate with {"search": true, "user_fetch": true, "training": false, "disallow_paths": ["/account"], "sitemap": "https://example.com/sitemap.xml"} · MCP: generate_ai_policy · Web form: https://www.rightshold.com/ai-crawler-policy

## Questions

### How do I block AI training crawlers but stay in AI search?

Disallow the training user agents (GPTBot, ClaudeBot, Google-Extended, Applebot-Extended, CCBot, Bytespider, meta-externalagent) and allow the search and user agents (OAI-SearchBot, ChatGPT-User, Claude-SearchBot, Claude-User, PerplexityBot, Perplexity-User). Choose search yes, agent fetches yes, training no, and the generator writes exactly that.

### What is a Content Signal?

A robots.txt line that states preferences for how content may be used after it is fetched: search (index and link), ai-input (use as live input to an AI answer) and ai-train (train or fine-tune models), each yes or no.

### What is TDMRep?

The W3C Text and Data Mining Reservation Protocol: a /.well-known/tdmrep.json file, an HTTP header or a meta tag saying whether text-and-data-mining rights are reserved. In the EU, a machine-readable reservation is how a rights holder opts out of the text-and-data-mining exception.

### Do these files stop every crawler?

No. They state preferences that well-behaved crawlers follow and that AI developers increasingly honour, but a crawler that ignores robots.txt is not blocked by it. Enforcement needs server-side rules.

### Some crawlers use one user agent for search and training. Which choice do they follow?

The stricter one: a mixed-purpose crawler is allowed only when both AI search and AI training are allowed.
