Prompt
robots.txt is blocking pages I didn't mean to block, how do I audit it?
Latest observation
To audit a robots.txt file, focus on what it actually blocks, which user-agents it applies to, and whether those rules match your intent.
1) Fetch the live file
Check the exact file search engines see:
curl -s https://example.com/robots.txt
Also check both versions if relevant:
https://example.com/robots.txthttp://example.com/robots.txt
2) Read it rule by rule
A robots.txt file is usually parsed like this:
User-agent: *
Disallow: /private/
Allow: /private/public-info/
Important things to inspect:
- User-agent sections: Which bots the rules apply to
- Disallow paths: What is blocked
- Allow paths: What exceptions exist
- Order and specificity: More specific rules can override broader ones
- Wildcards:
*and$can broaden matching in unexpected ways
Example pitfalls:
Disallow: /blocks the entire siteDisallow: /pagealso blocks/page-2,/pages/, etc. depending on matcher behaviorDisallow: /*?may block all URLs with query parameters- A misplaced
User-agent: *can apply too broadly
3) Compare against intended indexability
Make a list of URLs that should:
- be crawlable
- be blocked
- be allowed as exceptions
Then compare them against the file. A simple checklist helps:
| URL | Should be crawlable? | robots.txt blocks it? |
|---|---|---|
/about | Yes | No |
/checkout/ | No | Yes |
/products/widget?ref=abc | Yes | Maybe |
4) Test with search engine tools
Use official testing tools to see how bots interpret the file:
- Google Search Console
- URL Inspection tool
- robots.txt-related crawl reports
- Bing Webmaster Tools
- robots tester / URL inspection
These tools help verify whether a specific URL is blocked.
5) Check for accidental broad patterns
Look for these common mistakes:
- Blocking directories that contain public pages
- Blocking file extensions used on public pages
- Blocking parameters too broadly
- Putting CMS-generated rules in place that you didn’t review
Examples:
Disallow: /tag/
Disallow: /search
Disallow: /*.php$
Disallow: /*?*
6) Validate syntax
Robots syntax is simple, but small formatting issues matter.
Watch for:
- typo in
User-agent - missing leading slash in paths
- multiple conflicting groups
- comments or whitespace that hide mistakes
- BOM/encoding issues if the file was edited in a strange editor
7) Check server/CDN behavior
Sometimes the file is altered before bots see it:
- CDN edge rules
- reverse proxy rewrites
- A/B tests
- locale-based serving
- environment-specific robots files
Make sure the live response is the one you expect.
8) Re-test after changes
After editing:
- Re-fetch the file
- Test important URLs again
- Request recrawl/reindex in search console if needed
9) Use a parser or crawler for a deeper audit
For larger sites, export all URLs and run a crawl simulation against robots.txt to find blocked pages you didn’t intend to block.
Useful approaches:
- Screaming Frog SEO Spider
- Sitebulb
- Custom script using robots parsing libraries
Quick manual audit steps
- Download
robots.txt - Identify all
User-agentblocks - List every
DisallowandAllow - Match them against important URLs
- Test those URLs in Search Console/Bing
- Fix and re-test
If you want, I can also help you audit a specific robots.txt file if you paste it here.