Understanding Robots.txt & Crawl Directives
The robots.txt file is a plain-text document hosted at the root of your domain (e.g., https://example.com/robots.txt). It communicates with search engine spiders and web crawlers using the Robots Exclusion Protocol (REP), instructing them on which areas of your site they are allowed or forbidden to crawl.
Key Directives
- User-agent: Identifies which crawler the directive applies to (e.g.,
Googlebotor*for all). - Disallow: Specifies URL paths that the robot must not request or crawl.
- Allow: Explicitly permits access to a specific sub-path inside an otherwise disallowed folder.
- Sitemap: Points crawlers directly to your XML sitemap URL for rapid URL discovery.
AI & LLM Crawlers
- GPTBot: OpenAI's crawler used for training AI models and ChatGPT data retrieval.
- ClaudeBot: Anthropic's crawler for powering Claude and model training datasets.
- PerplexityBot: Perplexity AI's real-time crawler for conversational search citations.
- Applebot: Apple's crawler for Siri suggestions, Spotlight, and Apple Intelligence.
Common Robots.txt Pitfalls to Avoid
- Blocking CSS and JavaScript: Never disallow access to your theme assets, styles, or scripts. Googlebot renders modern pages like a browser; blocking scripts prevents Google from evaluating mobile friendliness and layout.
- Using robots.txt to hide sensitive data: Robots.txt is publicly visible to everyone. Disallowing a secret admin path simply advertises its location. Use server authentication (HTTP auth) or session logins instead.
- Expecting Disallow to de-index pages: Disallowing a page tells crawlers not to crawl it, but Google can still index the URL if other sites link to it. To remove a page from search results, allow it to be crawled and include a
<meta name="robots" content="noindex">tag.
Need to test your page snippets or meta tags? Use our Google SERP Simulator or check on-page headings and schema with the On-Page SEO Checker.