What robots.txt does (and doesn’t)
robots.txt is a small text file at the root of your site that tells crawlers which URLs they may request.
What it does
It manages crawler traffic. Well-behaved crawlers read https://yoursite/robots.txt before crawling and follow its rules for their user agent.
What it doesn’t do
- It does not keep a page out of Google. Google says a blocked URL can still be indexed if other pages link to it. Use
noindexand let Google crawl the page instead. - It is not security. Anyone can read it, and bad bots can ignore it.
AI crawlers
Several AI companies publish robots.txt tokens: GPTBot and OAI-SearchBot (OpenAI), Google-Extended (Google), ClaudeBot (Anthropic), PerplexityBot (Perplexity), CCBot (Common Crawl) and Applebot-Extended (Apple). Some are for model training and some for AI search results, so read each vendor’s page before blocking. The robots.txt generator links to each one.
Common mistakes
Disallow: /copied from a staging site, which blocks everything.- Blocking CSS or JavaScript files that Google needs to render the page.
- Placing the file anywhere other than the site root.