Free tool · no signup
Robots.txt tester and generator
Paste your robots.txt, pick a crawler and test any URL to see whether it is allowed and which rule decided. Or build a new file from presets, including a block list for AI crawlers.
By the Bug Circuit security team · Last updated
Your robots.txt
Result for Googlebot
/AllowedNo rule in the "*" group matches this URL, so it is allowed.
/private/notes.htmlBlockedDisallow: /private/ (line 2) is the longest matching rule in the "*" group.
/private/press-kit.htmlAllowedAllow: /private/press-kit.html (line 3) is the longest matching rule in the "*" group.
/files/report.pdfBlockedDisallow: /*.pdf$ (line 4) is the longest matching rule in the "*" group.
- Mediumrobots.txt advertises sensitive paths
Anyone can read this file, and attackers do. Listing /private/ tells them those paths exist. Protect them with a login or a server rule instead, and leave them out of robots.txt.
How it works
How a crawler reads the file
A robots.txt file is a list of groups. Each group starts with one or more User-agent lines naming a crawler (or * for everyone) and is followed by Allow and Disallow rules. A crawler uses the group that names it. If none does, it uses the * group. A group that names a crawler replaces the * group for that crawler, the two are not combined.
Inside the group, the most specific rule wins, and specific means the longest path. With Disallow: /private/ and Allow: /private/press-kit.html, the press kit page is allowed because its rule is longer. If an Allow and a Disallow match with the same length, Allow wins. A * matches any run of characters, and a $ at the end means the URL must end there, so Disallow: /*.pdf$ blocks /a/report.pdf but not /a/report.pdf?download=1. This tester follows those rules, which are written down in RFC 9309.
What robots.txt does not do
It is not security. The file is public, and anyone can read it, including attackers looking for an admin folder or a backup directory. Listing /admin/ or /backup/ in robots.txt tells them those paths exist. Protect private areas with a login or a server rule, and leave them out of the file. The tester flags paths that look sensitive.
It does not remove pages from Google. A blocked URL can still appear in results, without a description, if other sites link to it. To keep a page out of search, let it be crawled and add a noindex meta tag or an X-Robots-Tag header. Google ignores a Noindex line inside robots.txt, and so does this tester.
Blocking AI crawlers
Several AI companies publish crawler names you can block, such as GPTBot, ClaudeBot, PerplexityBot and CCBot. Blocking them is a request, and honouring it is voluntary. Some names, like Google-Extended and Applebot-Extended, are controls rather than crawlers: they tell the company not to use your content for AI training, and do not change how Google Search or Applebot index you. Blocking an AI search crawler can also keep your pages out of that product's answers, so decide per crawler.
Worked examples
A WordPress site
Block the admin area but allow the one admin file front-end features need, and publish the sitemap.
User-agent: * Disallow: /wp-admin/ Allow: /wp-admin/admin-ajax.php Sitemap: https://example.com/sitemap.xml
The longer Allow rule beats the shorter Disallow, so admin-ajax.php stays reachable. Without it, some themes and plugins break for crawlers that render pages.
Longest rule wins
Rules: Disallow: /private/ and Allow: /private/press-kit.html. Test /private/notes.html and /private/press-kit.html.
/private/notes.html Blocked (Disallow: /private/) /private/press-kit.html Allowed (Allow: /private/press-kit.html)
The Allow rule is 23 characters long and the Disallow rule is 9, so the Allow rule decides for the press kit.
Keep AI training crawlers out, stay in search
Block three AI crawlers, allow everyone else.
User-agent: GPTBot User-agent: ClaudeBot User-agent: CCBot Disallow: / User-agent: * Disallow:
Googlebot and Bingbot use the * group, which blocks nothing, so search visibility is unchanged.
Frequently asked questions
Where does robots.txt go?
What is the difference between robots.txt and noindex?
Does Disallow remove a page from Google?
Does Google follow Crawl-delay?
How do the * and $ wildcards work?
What happens if my robots.txt is missing or broken?
Should I block AI crawlers?
Keep reading
See what attackers see, for free
Run the free passive check on your website. No login, no impact on your site, results in seconds.
Ready for the full manual audit? See pricing