A robots.txt file tells crawlers which paths they may request. Testing it sounds simple: paste the file into a tool, enter a URL, read the answer. In practice, most failures come from something the tester does not model: the file is served with a 5xx, a CDN blocks the crawler before it reads the file, the rule is on a subdomain, or the wildcard match is not the one the author expected.
This guide explains what a tester can and cannot prove, the RFC 9309 rules that decide matching, how Google's own report works, and a repeatable pre-launch check. Sources were checked on 23 November 2026.
| Symptom | Likely cause | Check |
|---|---|---|
| A page is blocked but no rule seems to match | The server returns a 5xx, or a WAF blocks the crawler before robots.txt is read | Fetch the URL with curl, inspect the status, and review CDN or WAF logs |
| A rule appears to be ignored | Syntax error, unsupported directive or a typo in the user-agent | Run the file through Google's validator and inspect the reported issues |
| The whole site is blocked | A Disallow: / rule inside the wildcard group | Inspect every group, not only the one named after your crawler |
| Only some pages are blocked | Longest-match rule or a wildcard pattern | Test the exact path and a sibling path to see which rule wins |
| Google still sees an old file | The last fetch is cached | Check the last fetch time in the report and request a recrawl |
| A subdomain is not covered | robots.txt is per host, not per domain | Fetch https://sub.example.com/robots.txt separately |
What a tester can and cannot tell you
A tester is a parser and a URL matcher. It answers one question: given this rule set, is this path allowed for this user-agent? That is useful, but it is not the same as asking whether a search engine will crawl, index or rank the page.
Google's own documentation is blunt about the limit. A robots.txt file manages crawler traffic; it is not a way to hide a page. If a page is blocked by robots.txt but linked from elsewhere, its URL can still appear in search results without a snippet. Blocking the crawler is not the same as removing the page.
A tester also cannot see server behaviour. A 5xx response, a redirect chain longer than the crawler follows, a content-type of text/html instead of text/plain, or a WAF challenge will change the outcome before the rule is ever parsed. Test the fetch separately from the parse.
The five checks that matter
First, fetch the file exactly as a crawler would: the lowercase path /robots.txt at the host root, with a normal user-agent. Check the status code, the content-type and the first few lines. A 200 with an HTML error page is not a valid robots.txt file.
Second, parse it. Google's report lists errors and warnings, and its validator highlights the line that caused them. An error prevents a rule from being used; a warning does not. Fix errors first, then decide whether the warnings matter.
Third, match the URLs you care about. Test a URL that should be allowed and one that should be blocked, not just the one you are worried about. If both return the same answer, the rule is probably too broad or in the wrong group.
Fourth, separate crawl control from index control. If the page must not appear in search, robots.txt alone will not do it. Google says it will not crawl or index content blocked by robots.txt, so a noindex directive on a blocked page is not a reliable removal path.
Fifth, check the sitemap. A sitemap that lists blocked URLs is a contradiction that wastes crawl budget and confuses diagnostics. Remove blocked URLs from the sitemap or unblock them deliberately.
- Fetch: status, content-type and exact path.
- Parse: errors, warnings and the offending line.
- Match: one allowed URL and one blocked URL.
- Index: robots.txt is not a removal tool.
- Sitemap: no blocked URLs listed as canonical.
How Google's robots.txt report works
Google's robots.txt report is part of Search Console. It shows the robots.txt files Google found for the top 20 hosts on a site, the last time they were crawled, and any warnings or errors. The report is available only for domain-level properties, or for a URL-prefix property without a path, such as https://example.com/.
The report lists the file path, fetch status, the date checked, the size and an issue count. A 404 means the file does not exist, and Google can crawl all URLs. A successful fetch with issues means Google ignores the lines it cannot parse and uses the rest. You can open the last fetched version, see previous versions from the last 30 days, and request a recrawl after a fix. A recrawl request does not guarantee an immediate crawl of the unblocked URLs.
The report covers up to 40 rows because it may show two origins for each of the top 20 hosts. If a subdomain is missing, create a domain property for it or fetch its robots.txt directly. The report is a Google-specific view; it does not tell you how Bing or another crawler will interpret the file.
RFC rules that break naive testers
RFC 9309 defines the Robots Exclusion Protocol. It says the rules must be accessible at /robots.txt in lowercase at the top-level path, and that crawlers must parse at least 500 kibibytes of the file. Content beyond that limit may be ignored, so a giant file with the important rule at the bottom is a trap.
Crawlers should follow at least five consecutive redirects. If the file is reached within five, it must be fetched, parsed and followed. If there are more than five, the crawler may stop. A redirect chain that works in a browser can fail for a crawler.
A 5xx response must be treated as a complete disallow. That is the opposite of a 404, which means no file and therefore no restrictions. A brief origin outage can therefore block the whole site for crawlers that follow the RFC, even though the page is fine.
Matching uses the most specific rule, measured in octets, and supports the * and $ wildcards. User-agent matching is case-insensitive. If more than one group matches, the groups are combined. A tester that only checks the first matching group, or treats a wildcard as a regex, will give the wrong answer.
A repeatable pre-launch test
Run this sequence whenever the file changes, not only at launch. It takes a few minutes and catches the failures that a UI tester hides.
- Fetch https://your-host/robots.txt with curl and confirm 200, text/plain and the expected first line.
- Run the file through Google's validator and record every error and warning.
- Test a known-allowed URL and a known-blocked URL in Google's report.
- Fetch each subdomain's robots.txt separately; do not assume the apex file applies.
- Check the file size and confirm the important rules are within the first 500 KiB.
- Compare the sitemap against the blocked paths and remove contradictions.
- After deploying, request a recrawl and check the last-fetch time the next day.
- Keep a copy of the file and the test results with the release record.
When a competitor wins
Google's report wins for Google-specific questions. It shows the exact file Google fetched, the parse issues and the last fetch time, which no third-party tester can reproduce with certainty. If the question is "what does Googlebot see", start there.
A third-party tester wins for bulk checks and multi-engine simulation. It can test hundreds of URLs against several user-agents and run in CI. The trade-off is that its interpretation may differ from a specific crawler's, so use it for regression, not as the final word.
A plain curl script wins for the fetch layer. It catches the 5xx, the redirect chain and the wrong content-type that a parser-level tester never sees. Put it in the deploy pipeline and fail the build on a non-200 response.
Server logs win for reality. They show which crawler actually requested which path, and whether the response was a 200, a 403 or a challenge. A robots.txt file can be perfect and still be defeated by a WAF rule.
Verdict
Test the fetch, the parse and the match separately. Use curl for the status and content-type, Google's report for Google's interpretation, and a third-party tool for bulk regression. Then check the sitemap for contradictions and the logs for what crawlers actually received.
Remember what robots.txt is for: managing crawler traffic. It is not an access control system and not a removal tool. If a page must not be indexed, use the right control for that job.
Frequently asked questions
What does a robots.txt tester do?
It parses a robots.txt file and matches a URL against the rules for a chosen user-agent. It tells you whether the path is allowed or disallowed under that interpretation. It does not prove that a search engine will crawl or index the page.
Does a 404 robots.txt block Google?
No. Google's documentation says a 404 means the file does not exist, and Google can crawl all URLs on the site. A 5xx is different: RFC 9309 says crawlers must treat it as a complete disallow.
Why is my robots.txt rule ignored?
Common causes are a syntax error, an unsupported directive, a typo in the user-agent, or a rule in a group that does not match the crawler. Google's report lists parse errors and warnings, and its validator highlights the offending line.
Does robots.txt remove a page from search results?
No. Google states that a blocked URL can still appear in results if it is linked from elsewhere, though without a snippet. To remove a page, use a noindex directive or remove the content; do not rely on robots.txt alone.
How large can a robots.txt file be?
RFC 9309 requires crawlers to parse at least 500 kibibytes. Content beyond that limit may be ignored, so keep the important rules near the top and keep the file small. Google's report also shows the fetched size.
Related
Sources
- Google Search Console robots.txt report · 23 Nov 2026
- Google robots.txt introduction · 23 Nov 2026
- RFC 9309: Robots Exclusion Protocol · 23 Nov 2026