Best Practice robots.txt for the AI Age

Antti Pasila
October 1, 2025
6 min read

The traditional robots.txt file has been the standard for controlling web crawlers since 1994. However, with the rise of AI assistants and LLM agents, we need to adapt our approach to ensure optimal discoverability while maintaining control over our content.

What You'll Learn

  • Modern robots.txt syntax for AI crawlers
  • Balancing AI access with content protection
  • Specific directives for different AI agents
  • Testing and validation strategies

Understanding AI Crawlers vs Traditional Bots

Traditional Search Bots

  • • Googlebot, Bingbot, etc.
  • • Follow robots.txt strictly
  • • Index for search results
  • • Respect crawl delays

AI Crawlers & LLM Agents

  • • ChatGPT, Claude, Perplexity
  • • May ignore robots.txt
  • • Train on content
  • • Need real-time access

Important: AI crawlers often don't respect robots.txt in the same way traditional bots do. This means you need a multi-layered approach to content protection and AI optimization.

Modern robots.txt Structure

Here's a comprehensive robots.txt template that works for both traditional search engines and AI crawlers:

# Traditional Search Engine Crawlers
User-agent: Googlebot
Allow: /
Disallow: /admin/
Disallow: /private/
Disallow: /api/
Crawl-delay: 1

User-agent: Bingbot
Allow: /
Disallow: /admin/
Disallow: /private/
Disallow: /api/
Crawl-delay: 1

# AI Crawlers and LLM Agents
User-agent: GPTBot
Allow: /
Disallow: /admin/
Disallow: /private/
Disallow: /api/
Disallow: /user-data/
Disallow: /sensitive/

User-agent: ChatGPT-User
Allow: /
Disallow: /admin/
Disallow: /private/
Disallow: /api/
Disallow: /user-data/
Disallow: /sensitive/

User-agent: Claude-Web
Allow: /
Disallow: /admin/
Disallow: /private/
Disallow: /api/
Disallow: /user-data/
Disallow: /sensitive/

User-agent: PerplexityBot
Allow: /
Disallow: /admin/
Disallow: /private/
Disallow: /api/
Disallow: /user-data/
Disallow: /sensitive/

# General AI Crawlers (catch-all)
User-agent: *
Allow: /
Disallow: /admin/
Disallow: /private/
Disallow: /api/
Disallow: /user-data/
Disallow: /sensitive/

# Sitemap location
Sitemap: https://yourdomain.com/sitemap.xml

# LLMs.txt location (if you have one)
LLMS: https://yourdomain.com/llms.txt

AI-Specific Directives and Considerations

1. Content Access Control

While AI crawlers may not always respect robots.txt, it's still important to define your boundaries clearly:

  • Allow public content: Blog posts, product pages, about pages
  • Block sensitive data: User accounts, admin panels, API endpoints
  • Protect proprietary content: Internal documents, pricing sheets

2. Rate Limiting and Crawl Delays

AI crawlers can be more aggressive than traditional bots. Consider implementing:

  • Crawl-delay directives: Slow down aggressive crawlers
  • Server-side rate limiting: Implement at the application level
  • IP-based restrictions: Block known problematic crawlers

3. Content Attribution and Licensing

Since AI crawlers train on your content, consider adding:

  • Attribution requirements: Request proper credit in AI responses
  • Licensing information: Define how your content can be used
  • Update frequency: Help AI understand content freshness

Testing and Validation

After implementing your robots.txt, test it thoroughly:

# Test robots.txt parsing
$ curl -s https://yourdomain.com/robots.txt
# Validate with Google's tool
$ curl "https://www.google.com/ping?sitemap=https://yourdomain.com/sitemap.xml"
# Test specific user agents
$ curl -H "User-Agent: GPTBot" -I https://yourdomain.com/

Validation Checklist

  • • robots.txt is accessible at /robots.txt
  • • Syntax is valid and parseable
  • • Sitemap URL is correct and accessible
  • • LLMS.txt reference is valid (if applicable)
  • • No conflicting directives
  • • Tested with multiple user agents

Best Practices Summary

  • Be specific: Use exact user-agent names for different AI crawlers
  • Protect sensitive content: Always block admin areas, user data, and API endpoints
  • Include sitemaps: Help crawlers discover your content efficiently
  • Monitor compliance: Track which crawlers respect your directives
  • Update regularly: Keep your robots.txt current with your site structure

Ready to optimize your site for AI?

Let Platinum.ai help you create a comprehensive AI Website Profile that ensures AI systems represent your business accurately.

Get Started