Auditing a crawl policy — steps and checklist
A robots.txt deployed with a mistake can remove a site from search entirely, or open internal paths to collection. Check it with the same routine before every release, and confirm real behaviour in the logs afterwards.
The order to check in
- Confirm
/robots.txtanswers 200 at the host root. If there is a redirect, check the final URL as well. - Run the file through a parser and look at the group and rule counts. Zero rules or an empty group usually means the wrong file was deployed.
- Pick ten to twenty representative paths and check the verdicts: home, a listing, a detail page, search results, admin and an attachment.
- Simulate search crawlers and AI crawlers separately. Confirm that a path allowed for search is blocked for training where intended.
- Check that the Sitemap URL is absolute and really answers 200.
- After deployment, read the server logs by crawler and look for requests to blocked paths. Adjust the rules when they disagree with the intent.
Failures that show up most
| Symptom | Cause | Fix |
|---|---|---|
| The whole site disappears from search | Disallow: / applied to the default group | Split the groups and block only what must be blocked |
| Images and CSS are not collected | A full block with no exceptions | Reopen rendering assets with Allow |
| Only some pages are indexed | Search result URLs are blocked too aggressively | Prefer canonical tags and noindex over blocking |
| A rule seems to do nothing | The rule sits outside a User-agent group | Move it inside the group |
| The Sitemap is not read | It is written as a relative path | Use the absolute URL |
| Crawling stops suddenly | robots.txt returns a 5xx | Check CDN and proxy error responses |
Pre-release checklist
- Zero syntax errors, and every warning has been reviewed.
- A
*group exists and does not contradict a named crawler group. - Every tested path gives the verdict you expect.
- The Sitemap URL is absolute and matches a file that exists.
- Staging and production robots.txt files have not been swapped.
- Someone will read the logs within 24 hours of the release.
Confirming with logs
robots.txt is voluntary, so the file alone does not prove what is collected. Read the server logs by crawler; if requests keep arriving for a blocked path, the file may be cached or the crawler may ignore it. The major crawlers cache robots.txt for about a day, so the previous rules can still apply right after a change.
Blocking a path in robots.txt does not remove an already indexed page. To drop it from an index, use a noindex response or the search engine's removal request. Blocking with robots.txt can prevent the crawler from ever seeing the noindex.
Questions
How often should this be checked?
Whenever the path structure changes, and at least once a quarter. Add new crawler tokens as they appear.
Can a bad robots.txt be reverted?
Fix the file and deploy again, but crawler caches can delay the effect by about a day. Make important changes during low traffic.
Why does a test tool disagree with a real search engine?
Non-standard per-crawler extensions and caching explain most differences. Compare with the real logs and the search engine's own tool.
Run the checklist through the tool once and keep the report.
Open the toolThis article follows RFC 9309 (Robots Exclusion Protocol, September 2022), the robots.txt internet draft (September 2022) and the llmstxt.org proposal (September 2024). Every domain and rule shown is synthetic.