Skip to content
← Back to SEO Basics

The robots.txt Guide

·7 min read

robots.txt is a simple text file that instructs web crawlers which parts of your website they may or may not access. It is the first line of defense in controlling how search engines and AI systems interact with your content.

Why robots.txt Matters

Without a proper robots.txt file, crawlers may:

  • Overwhelm your server with too many requests
  • Index private or duplicate content
  • Miss important pages because they never reach them
  • Block AI crawlers unintentionally, reducing your visibility in AI answers

How robots.txt Works

The file lives at the root of your domain (e.g., https://example.com/robots.txt) and consists of one or more groups. Each group defines rules for a specific user-agent (crawler).

The basic syntax is:

User-agent: *
Allow: /
Disallow: /private/

User-agent: GPTBot
Allow: /
Disallow: /admin/

Key Directives

  • User-agent – the crawler name (use * for all crawlers).
  • Allow – which paths the crawler may access.
  • Disallow – which paths the crawler must not access.
  • Sitemap – location of your sitemap (optional).

AI Crawlers and robots.txt

Modern AI systems use specialized crawlers to gather data. Here are the most common ones:

  • GPTBot – used by OpenAI for ChatGPT and GPT models.
  • ClaudeBot – used by Anthropic for Claude.
  • PerplexityBot – used by Perplexity AI.
  • Google‑Extended – Google’s crawler for AI products.

If you block these crawlers, your content may not appear in AI-generated answers.

🤖 Check your AI crawler access

Use our robots.txt Checker to see which AI crawlers are allowed or blocked.

Best Practices

  1. Allow AI crawlers – unless you have a specific reason to block them, give them access.
  2. Block private areas – protect admin pages, staging sites, and duplicate content.
  3. Use Sitemap directive – helps crawlers find your content.
  4. Test your file – use tools like the GazeRank robots.txt checker or Google Search Console.
  5. Keep it simple – a short, well‑structured file is easier to maintain.

Common Mistakes

  • Blocking essential crawlers – blocking Googlebot or AI crawlers unintentionally.
  • Using Disallow incorrectly – e.g., Disallow: / blocks everything.
  • Forgetting the Sitemap – makes it harder for crawlers to discover all your pages.
  • Not updating – as your site evolves, your robots.txt should evolve too.

Next Steps

Conclusion

robots.txt is a powerful but simple tool. Used correctly, it ensures that the right crawlers can find and interpret your content – boosting both traditional SEO and AI visibility.

Ready to check your robots.txt?

Run a free scan and see if AI crawlers are blocked – plus get recommendations to improve.

Check robots.txt →

Free · No signup required