Full URLs or paths like /blog/post?page=2. Matching is case sensitive and includes the query string.
Load a site's robots.txt or paste one to see results. Press Try sample to see how it works.
How to use
Load or paste the file
Choose Fetch from a site, enter a domain and press Load. Or choose Paste robots.txt to test a draft. A fetched file appears in an editable box, so you can try a fix before changing the live file.
Enter URLs and pick bots
Type one full URL or path per line, up to 100. Tick the crawlers to test, such as Googlebot, Bingbot or GPTBot, or type another user-agent token like AhrefsBot in the box below.
Read the verdicts
Each cell shows Allowed or Blocked with the matching rule. Select a cell to highlight that line in the file, check the AI crawler row and the syntax list, and download the results as CSV.
Why Robots.txt Tester and Validator
- Follows Google's matching: longest rule wins, Allow wins a tie, * and $ wildcards work.
- Tests up to 100 URLs against several crawlers at once.
- Highlights the deciding rule in the file and exports results to CSV.
- Checks a page's CSS, JavaScript and images, the HTTP status of the file and each Sitemap URL.
How Google picks the winning rule
First, the crawler finds its group: the User-agent line that names it most specifically, or the * group if nothing names it. Only the Allow and Disallow rules in that group count. Next, every rule whose path matches the start of the URL path, query string included, is a candidate. The candidate with the longest path wins. If an Allow rule and a Disallow rule are the same length, Allow wins. If no rule matches, the URL is allowed.
These examples come straight from that logic and match the results this tester shows.
| Rules in the group | URL tested | Result |
|---|---|---|
| Allow: /p ; Disallow: / | /page | Allowed. /p is longer than / |
| Allow: /folder ; Disallow: /folder | /folder/page | Allowed. Same length, so Allow wins |
| Allow: /page ; Disallow: /*.htm | /page.htm | Blocked. /*.htm is the longer rule |
| Allow: /$ ; Disallow: / | / | Allowed. /$ matches only the homepage |
| Allow: /$ ; Disallow: / | /page.htm | Blocked. Only Disallow: / matches |
| Disallow: /admin/ ; Allow: /admin/help/ | /admin/help/faq | Allowed. /admin/help/ is longer |
Robots.txt directive and wildcard reference
A robots.txt file is plain text with one directive per line, written as a name, a colon and a value. Names are not case sensitive; paths are. Lines starting with # are comments. Google reads only the first 500 KiB of the file.
| Directive | Example | What it does |
|---|---|---|
| User-agent | User-agent: Googlebot | Starts a group for that crawler. * covers crawlers without a group of their own. |
| Disallow | Disallow: /admin/ | Blocks /admin/ and everything under it, such as /admin/users. |
| Allow | Allow: /admin/help/ | Reopens a path inside a blocked folder, when it is the longer match. |
| Empty Disallow | Disallow: | Blocks nothing, the same as allowing everything. |
| * wildcard | Disallow: /*?sort= | Any path followed by ?sort=, such as /shoes?sort=price. |
| $ end anchor | Disallow: /*.pdf$ | URLs ending in .pdf. /file.pdf?v=2 does not match. |
| Sitemap | Sitemap: https://example.com/sitemap.xml | Points crawlers to your sitemap. Needs a full URL and applies to every group. |
| Crawl-delay | Crawl-delay: 10 | Seconds between requests for Bingbot. Googlebot ignores it. |