llms.txt & robots.txt for AI Search: Copy-Paste Templates (2026)
Many websites accidentally block AI search engines while trying to block scrapers—or publish /llms.txt expecting instant traffic without checking whether /robots.txt even lets search crawlers in. The short answer: Use /robots.txt as your crawl permission gate (allow search bots like OAI-SearchBot , PerplexityBot , and Claude-SearchBot , even if you disallow model-training tokens like GPTBot and…
Many websites accidentally block AI search engines while trying to block scrapers. They publish /llms.txt expecting instant traffic without checking whether /robots.txt even allows search crawlers in. The short answer is to use /robots.txt as the crawl permission gate, allowing search bots like OAI-SearchBot, PerplexityBot, and Claude-SearchBot, even if disallowing model-training tokens like GPTBot and Google-Extended.
Pairing it with /llms.txt (Content-Type: text/plain; charset=utf-8) helps AI assistants find product pages, pricing, and docs in a single fetch.
To separate search citation bots from training crawlers, use User-Agent headers: OpenAI for ChatGPT, Anthropic for Claude, and Google for Gemini. Recommended rules include:
- Allow all pages for search bots like OAI-SearchBot, PerplexityBot, and Claude-SearchBot.
- Allow / for ChatGPT-User to fetch pages triggered by user queries.
- Allow / for GPTBot to opt-out of OpenAI Foundation model training corpus.
The production robots.txt split template blocks training while keeping AI search. It includes:
- User-agent: * Allow: / Disallow: /admin/ Disallow: /api/
- OAI-SearchBot, ChatGPT-User, PerplexityBot, Claude-SearchBot allowed
- GPTBot disallowed
- Sitemap: https://yourdomain.com/sitemap.xml
To test your live domain, run the URL through the free Onyxcine SEO & GEO Checker in under 10 seconds.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to