robots.txt Tester: Is This URL Allowed or Blocked?
Enter a URL, or paste your own rules, to see which robots.txt line decides access for each crawler.
One character in robots.txt can hide a whole site from search. “Disallow: /” blocks everything, an empty “Disallow:” blocks nothing, and a group for Googlebot quietly overrides everything you wrote under “User-agent: *”. Google replaced the old robots.txt Tester in Search Console with a report in 2023, so testing a rule against a specific URL now takes a separate tool.
This robots.txt tester fetches and parses the file, tests any URL against Googlebot, Bingbot and AI bots using Google’s longest-match rules, and highlights the line that decided the result. It also reports syntax errors and sitemap lines, and you can paste draft rules to test them before uploading.
How to test robots.txt rules
Enter a URL or paste rules
We fetch /robots.txt from the URL’s host, or use the rules you paste instead.
Choose the crawler
Test Googlebot, Bingbot or an AI bot such as GPTBot, ClaudeBot or PerplexityBot.
Read the verdict
You see allowed or blocked, the group and line that matched, and any syntax problems in the file.
How crawlers match robots.txt rules
Google documents its behavior in its robots.txt specification, and the format is standardized in RFC 9309. Three rules explain almost every surprise:
- A crawler obeys one group. It uses the group with the most specific user-agent that matches it, so Googlebot follows a
User-agent: Googlebotgroup and ignoresUser-agent: *entirely. Several groups naming the same crawler are combined. - The longest matching path wins. Inside that group, the rule with the longest matching path applies, wherever it sits in the file.
- On a tie, the least restrictive rule wins. If an
Allowand aDisallowmatch with equal length, Google allows the URL.
User-agent: *
Disallow: /shop/
Allow: /shop/sale/
# /shop/cart -> blocked (Disallow: /shop/)
# /shop/sale/boots -> allowed (Allow: /shop/sale/ is longer)
# /Shop/cart -> allowed (paths are case-sensitive)
Two wildcards are supported: * matches any sequence of characters and $ marks the end of the URL, so Disallow: /*.pdf$ blocks URLs that end in .pdf.
What robots.txt can’t do
- It doesn’t remove pages from Google. A blocked URL can still be indexed, without its content, if other pages link to it. To keep a page out of results, allow crawling and use noindex.
- It isn’t security. The file is public and only well-behaved bots obey it. Protect private areas with a login.
- Google ignores some directives.
Crawl-delayisn’t supported (Bing and some others do read it), andNoindex:lines in robots.txt stopped working in 2019. - It covers one host and protocol.
https://example.com/robots.txtdoesn’t apply tohttps://shop.example.comor tohttp://URLs; each needs its own file.
Don’t block the CSS and JavaScript files Google needs to render your pages, and keep the file small: Google ignores anything after the first 500 KiB.
When robots.txt itself fails
How your server answers /robots.txt matters as much as what the file says:
| Response | How Google reacts |
|---|---|
| 200 with rules | Follows the rules, generally caching the file for up to 24 hours |
| 404 or another 4xx (except 429) | Assumes there are no restrictions and crawls everything |
| 5xx or a timeout | Stops crawling the site for the first 12 hours, then uses the last good copy for up to 30 days |
| Redirect | Follows at least five hops, then treats the file as a 404 |
A staging rule copied to production — a single Disallow: / — is a classic cause of a site vanishing from search. Test the live file after every deploy, check the AI side with the AI crawler checker, and build a fresh file with the robots.txt generator. More basics in our robots.txt entry.
Tips for testing robots.txt
- Test the URLs that matter most — home page, a category, a product, a blog post — after every robots.txt change.
- Remember that rules are prefix matches: “Disallow: /blog” also blocks /blog-archive and /blogger; use “Disallow: /blog/” for the folder.
- When you add a group for one bot, copy in the general rules it still needs, because it no longer reads the * group.
- List your sitemap with an absolute URL on a Sitemap line; it can go anywhere in the file.
- Keep a copy of the previous robots.txt so you can roll back quickly if a deploy blocks the site.
Limits to keep in mind
The tester applies Google’s documented matching rules; other crawlers may handle edge cases differently, and compliance is voluntary — robots.txt can’t stop a bot that ignores it. It tests the file as it is now, while Google may still use a cached copy for up to a day. It doesn’t look at meta robots tags or X-Robots-Tag headers; for the full “can Google index this page?” answer, use the indexability checker.
Last updated Oct 30, 2026 by the Yes SEO team.
robots.txt Tester: frequently asked questions
How do I test my robots.txt file?
Enter a URL on your site and choose a crawler. The tester fetches your robots.txt, applies the matching rules and shows whether the URL is allowed or blocked and which line decided it. You can also paste rules to test a draft.
What happened to Google’s robots.txt Tester?
Google retired it from Search Console in late 2023 and replaced it with a robots.txt report that shows which files Google fetched and any errors. Testing specific rules against URLs now needs a separate tool such as this one.
Does Disallow remove a page from Google?
No. Disallow stops crawling, not indexing, so a blocked URL can still appear in results if other pages link to it. Use noindex on a crawlable page to remove it.
Is robots.txt case-sensitive?
Paths are, so “Disallow: /Admin” doesn’t block /admin. Field names such as Disallow and the user-agent value are not case-sensitive.
Does Google support Crawl-delay?
No. Google ignores Crawl-delay and adjusts its crawl rate based on how your server responds. Bing and some other crawlers do read it.
Can I test rules for AI bots?
Yes. Pick GPTBot, ClaudeBot, PerplexityBot or another AI crawler to see how your rules apply to it. For an overview of every AI bot at once, use the AI crawler checker.