Robots.txt tester
Paste robots.txt, choose a crawler and check whether the rules allow it to fetch your URL.
- Free
- No account required
Paste your robots.txt
Copy the file contents and enter the URL you want to test. Analysis runs locally and nothing is uploaded.
This robots.txt tester checks locally in your browser whether pasted rules block a URL for a given crawler. Path matching follows Google’s specification: the longest matching pattern wins, and a tie resolves to Allow. It does not fetch the file from your server. It analyses what you paste.
Why robots.txt blocks too much
The most common mistake is a prefix where a directory was meant. Disallow: /fish also blocks /fishheads and /fish.html. A directory needs the trailing slash.
The second is believing robots.txt removes a page from the index. It does not. It blocks fetching, so the search engine never sees a noindex tag either, so the URL can stay in results without a description.
The third is blocking CSS and JavaScript. Without them the search engine renders the page incompletely, which distorts its read of layout and accessibility.
Analysis runs locally in your browser. This tool does not fetch the file from your server and cannot tell you whether a crawler actually obeyed the rules. It shows what the rules say.
Test URLs that should remain accessible
Alongside the blocked directory, test a product page, a category and resources needed for rendering. Repeat for the relevant User-agent. The result depends on the selected bot's rules and path pattern.
How to check if robots.txt blocks a page
You check robots.txt for a specific URL and a specific crawler, because each crawler reads only its own group of rules. Four steps cover every change to the file.
-
Copy the current file from the server
Open
https://example.com/robots.txtand copy the whole file. It applies only to the host, protocol and port where it lives, so a subdomain has its own robots.txt. -
Paste the file and enter the full URL
Paste the content into the tester above and enter the URL you want to check. Paths in robots.txt are case sensitive, so
/Blogand/blogare two different URLs. -
Choose the crawler and read the rule
The tester picks the User-agent group for that crawler and shows the rule that decides the result, with its line number. The longest matching pattern wins, and Allow wins a tie.
-
Check the URLs that must stay open
Test the home page, key pages and your CSS and JavaScript files. Google advises against blocking resources that make the page harder to understand when they are missing.
Robots.txt rule examples
Three cases where a single line changes the result for many URLs.
User-agent: *
Disallow: /cart
# also blocks /cart-gift-ideasUser-agent: *
Disallow: /cart/The trailing slash limits the rule to the /cart/ directory and the URLs under it.
User-agent: *
Disallow: /files/
Allow: /files/pricing.pdf Allow has the longer pattern, so /files/pricing.pdf stays open even though the directory is blocked. Line order does not matter.
User-agent: *
Disallow: /User-agent: *
Disallow: /admin/
Sitemap: https://example.com/sitemap.xmlDisallow: / blocks the whole site. This line often carries over from staging during a deployment.
Common robots.txt mistakes
-
Using robots.txt to remove a page from results
Google states plainly that robots.txt is not a way to keep a page out of Google. A blocked URL can still appear in results without a description. Use noindex or password protection for that.
-
Blocking CSS and JavaScript
Without these files Google has a harder time understanding the page. Keep them open when the page needs them to display its content.
-
A file that is too large
Google reads the first 500 KiB of the file and ignores the rest. Rules at the end of a very long file stop working without any warning.
-
Robots.txt returning 5xx
On a server error Google pauses crawling for 12 hours, then uses the last good version of the file for up to 30 days. A broken file can therefore halt crawling of the whole host.
-
Unsupported directives
Google recognizes only user-agent, allow, disallow and sitemap. Googlebot skips crawl-delay and noindex in robots.txt.
Robots.txt in the standard, in Google documentation and in data
| Value | What it means | Source |
|---|---|---|
| 500 KiB | Google’s robots.txt size limit. Content past it is ignored. RFC 9309 requires crawlers to parse at least 500 KiB. | Google Search Central, robots.txt specification |
| 24 h | How long Google usually caches robots.txt. A change to the file can take up to a day to apply. | Google Search Central, robots.txt specification |
| 5 | Minimum number of consecutive robots.txt redirects a crawler should follow under RFC 9309. Google treats anything beyond that as a 404. | IETF, RFC 9309 |
| 4xx | Google treats 4xx errors other than 429 as if no robots.txt existed, meaning no crawl restrictions. | Google Search Central, robots.txt specification |
| 84.9% | Share of robots.txt files that returned status 200 in the Web Almanac 2025, on desktop and mobile. About 13% returned 404. | HTTP Archive, Web Almanac 2025, SEO |
| No description | How a URL blocked in robots.txt can appear in results when other pages link to it. | Google Search Central, robots.txt introduction |
Sources checked:
Matching rules
- *Wildcard
- Stands for any run of characters. /*.php matches /index.php and /folder/x.php.file.html.
- $End anchor
- Pins the pattern to the end of the path. /*.php$ matches /a.php but not /a.php?x=1.
- LMLongest match
- The longest matching pattern decides, regardless of order in the file.
- AWAllow wins
- On equal pattern length the least restrictive rule wins, which is Allow.
Paste the file contents, enter the full URL and pick a crawler. The tester finds the User-agent group that applies to that crawler, matches the path patterns, and shows the rule that decides the outcome along with its line number.
Yes. Analysis happens in your browser and the pasted contents are not sent to CometWeb. That is also why it does not fetch the file from your server. It checks exactly what you paste.
No. It blocks fetching, not indexing. A blocked URL can still appear in results without a description if links point to it. Excluding a page needs a meta robots noindex or an X-Robots-Tag header, and the page has to be fetchable for the search engine to see either.
Paths in robots.txt match as prefixes, not as whole segments. To block only the directory, add a trailing slash: Disallow: /fish/.
The one with the longer pattern. On equal length Allow wins as the least restrictive.
The robots.txt file has to live at the root of the host as /robots.txt, in lowercase. Its rules apply only to that host, protocol and port, so blog.example.com and example.com need separate files.
Google usually sees changes to robots.txt within 24 hours, because it caches the file for that long. A Cache-Control header can lengthen or shorten that time, and on server errors Google keeps an older version longer.
When robots.txt returns a 404 or another 4xx error other than 429, Google assumes there is no file and crawls without restrictions. Returning 401 or 403 for the file does not slow crawling either.
What else might come in handy
File or code ready? Check the result on the live page
Indexability, metadata and structure, with priorities and a client report.