Free tool ยท No sign-up

Robots.txt Tester

Fetch any website's robots.txt or paste your own, then test whether Googlebot, Bingbot and AI crawlers can fetch a URL. See the exact rule that allows or blocks it, and catch syntax mistakes before they cost you traffic.

  • Follows Google's matching rules
  • Compares 20 search, AI and social crawlers
  • Pasted text never leaves your browser

Need to write the file first? Use the Robots.txt Generator.

How a robots.txt decision is made

Four rules decide whether a crawler can fetch a URL

Robots.txt looks simple, but the order of lines doesn't matter and the most specific rule wins. This is what the tester does with your file.

1. Pick the group

A crawler follows the group that names it. If there is none, it follows the User-agent: * group. Groups naming the same crawler are merged.

2. Longest match wins

Every Allow and Disallow rule that matches the URL competes. The rule with the longest path is the most specific, so it wins.

3. Allow wins a tie

If an Allow and a Disallow match with the same length, the less restrictive rule applies, so the URL stays crawlable.

4. Wildcards and $

* matches any run of characters and a trailing $ means the URL must end there. Matching is case-sensitive and includes the query string.

The robots.txt response itself

What Google does with each type of robots.txt response

The HTTP status of /robots.txt matters as much as its content. The tester reads the status when it fetches a live file and tells you which case applies.

How Google treats robots.txt by HTTP status
ResponseWhat Google doesWhat to do
200 OKReads the file and follows its rules. Content past 500 KiB is ignored.Keep the file small and valid.
301 or 302 redirectFollows up to 5 redirects, then treats the file as missing.Serve robots.txt directly, from the exact host that is being crawled.
404 or other 4xxTreats the file as missing and crawls everything.Fine if you want no restrictions. Add a file if you do.
429 or 5xxAssumes the whole site is off limits and pauses crawling. After 30 days of errors it uses the last good copy or crawls freely.Fix server errors on /robots.txt quickly: they can stop all crawling.
200 with an HTML pageTries to read the HTML as robots.txt and finds nothing useful.Return a real plain-text file instead of a soft 404 page.
Common mistakes

Robots.txt problems this tester catches

These are the issues I find most often when auditing real sites.

Disallow: / left from staging

A site-wide block copied to production removes every page from crawling. The tester flags it and shows which URLs it blocks.

Blocking CSS and JavaScript

Google needs your CSS and JS to render pages and judge mobile-friendliness. Rules like Disallow: /wp-includes/ are flagged.

Full URLs instead of paths

Disallow: https://example.com/private/ never matches anything. Rules must be paths that start with /.

Rules before User-agent

An Allow or Disallow that comes before any User-agent line applies to nobody and is silently ignored.

Noindex in robots.txt

Google stopped supporting Noindex: in robots.txt in 2019. Use a robots meta tag or an X-Robots-Tag header instead.

Typos and wrong directives

Misspelled directives, missing colons and unsupported lines such as Crawl-delay (ignored by Google) are listed with the line number.

Honest limits

What robots.txt, and any tester, can't do

Robots.txt controls crawling. It does not control everything people expect it to.

It isn't security

Anyone can read robots.txt, and bad crawlers ignore it. Never use it to hide private data.

It doesn't remove pages

A blocked URL can still appear in results, without a description, if other sites link to it. Use noindex or remove it in Search Console.

AI crawlers choose to obey

The big AI companies say they follow robots.txt, but it is a request, not enforcement.

Google caches the file

Google may use a cached copy for up to 24 hours, so a change isn't instant.

How it decides

What a robots.txt tester does and how crawlers read your rules

A robots.txt tester answers one question: given this file, can this crawler fetch this URL? It picks the group that applies to the crawler, compares every Allow and Disallow rule against the URL's path, and shows which rule decided. That last part is what makes a tester useful. Reading a file by eye is unreliable, because line order does not matter and the longest matching rule wins.

Google describes the logic in its robots.txt specification: paths are case-sensitive, * and $ are supported wildcards, the most specific rule applies, and the less restrictive rule wins when two conflict. The wider standard is RFC 9309.

The file's HTTP response matters as much as its text. A missing file, a redirect and a server error each lead to different crawler behaviour. So this tester reads the status of the live file as well as its rules, and it can also take pasted text if you want to try a change before it goes live.

When to use it

When to test a robots.txt file

Test whenever a rule could have changed, and before any change goes live.

A page is reported as blocked

Search Console says a URL is blocked by robots.txt. Paste the URL, choose Googlebot and see the exact line responsible, then decide whether the rule or the page should change.

Before you deploy a change

Paste the new version of the file and test the URLs that must stay crawlable, such as top products and key articles. Fix any surprise before the file replaces the old one.

Right after a launch or migration

Fetch the live file and confirm no staging Disallow: / came across. Then test a handful of important URLs for Googlebot and Bingbot.

Checking AI crawler access

Run the same URL as several crawlers to see which AI user agents your file allows. A named group for one crawler overrides the * group for that crawler.

Auditing a client or competitor

Fetch any public site's file to see what it blocks, which sitemaps it lists and whether it carries unsupported lines such as Crawl-delay or Noindex.

Investigating sudden crawl drops

If crawling stops or slows, check the file's HTTP status. Repeated server errors on /robots.txt can pause crawling of the whole site.

Common mistakes

Mistakes people make when testing robots.txt

A tester is only as good as the question you put to it. These are the usual ways to get a misleading answer.

Testing only Googlebot

What goes wrong: A file can allow Googlebot and still block another crawler through a named group. Bing, AI crawlers and social preview bots may all get different results.

The fix: Test each crawler that matters to you. Remember that a crawler follows only the most specific group that names it, so a named group does not inherit rules from the * group.

Assuming line order decides

What goes wrong: People expect the first matching rule to win. In Google's matching the order of lines does not matter. The longest matching path wins.

The fix: Read results by specificity. To open one file inside a blocked folder, add a longer Allow such as Allow: /private/press-kit/ under Disallow: /private/.

Forgetting case and query strings

What goes wrong: Paths are case-sensitive, and the query string is part of the URL being matched. A rule for /Shop/ does not cover /shop/, and a rule can miss or catch URLs because of a parameter.

The fix: Test the exact URL as it appears in your sitemap or logs, with its capitalisation and parameters.

Ignoring the HTTP status of robots.txt

What goes wrong: A 404 means no rules, so everything may be crawled. A 5xx stops Google from crawling for a while. A soft 404 returns an HTML page with a 200 status, which contains no usable rules.

The fix: Make sure /robots.txt returns 200 with plain text, or a clean 404 if you want no rules. Fix server errors on it quickly.

Trusting a pasted copy over the live file

What goes wrong: The text in your editor may differ from what the server returns, for example after a CDN, plugin or host rewrites it. Google also caches the file, so a change is not seen at once.

The fix: After deploying, fetch the live file and test again. Expect Google to take up to about a day to refresh its cached copy, then confirm in Search Console.

Reading 'allowed' as 'indexed'

What goes wrong: A URL that is allowed can still be left out of the index. A URL that is blocked can still be indexed without a description if others link to it.

The fix: Use the tester for crawl access only. For indexing questions, check for noindex, canonicals and the Page indexing report in Search Console.

Glossary

Robots.txt testing terms explained

Matching group
The group of rules a crawler obeys. It is the group whose User-agent line names the crawler most specifically, or the * group if none does.
Longest match
Among all rules that match a URL, the one with the longest path is the most specific and applies. Google uses this instead of reading the file top to bottom.
Least restrictive rule
When an Allow and a Disallow match with equal specificity, Google applies the one that permits crawling, so the URL stays crawlable.
Product token
The short name a crawler uses in robots.txt, such as Googlebot or GPTBot. Matching of this token is case-insensitive, while URL paths are case-sensitive.
Soft 404
A page that says it is missing but returns a 200 status. If this happens at /robots.txt, crawlers receive an HTML page and find no usable rules.
Cached robots.txt
A copy a crawler keeps instead of fetching the file on every request. Google generally caches it for up to 24 hours, so edits are not seen immediately.
Crawl versus index
Crawling is fetching a URL. Indexing is storing and serving it in results. Robots.txt controls the first only, which is why a blocked URL can still appear.
Unsupported directive
A line Google does not act on, such as Crawl-delay or Noindex. The line is harmless to include but has no effect on Google.
Madhav Kushwaha, SEO, AEO, GEO and digital marketing consultant in Kathmandu, Nepal

Built by

Madhav Kushwaha

SEO, AEO, GEO & Digital Marketing Consultant in Kathmandu, Nepal, and trainer at ODcrU Academy and TechAxis Institute. I built this tester because a single wrong line in robots.txt can hide a whole section of a site from Google, and most testers don't show which rule made the decision. The matching here follows Google's published specification, and the logic is exactly what the code does.

Robots.txt Tester: Frequently Asked Questions

A robots.txt tester checks whether a given crawler is allowed to fetch a given URL under a robots.txt file. This one fetches a live file or takes pasted text, applies Google's matching rules and shows the exact line that decided each result.
Enter the website and press Fetch robots.txt, or paste the file. Add the URLs you want to check, choose a crawler such as Googlebot and press Test. Each URL shows as Allowed or Blocked, with the rule and line number behind it.
Google picks the matching rule with the longest path, because it is the most specific. If an Allow and a Disallow match with equal length, the Allow wins. The order of lines in the file doesn't matter.
Yes. An asterisk (*) matches any run of characters, and a dollar sign ($) at the end of a path means the URL must end there. For example, Disallow: /*.pdf$ blocks every URL that ends in .pdf. Matching is case-sensitive.
Robots.txt stops crawling, not indexing. If other pages link to a blocked URL, Google can still index it with no description. To keep a page out of results, let Google crawl it and add a noindex meta tag or X-Robots-Tag header, or remove it in Search Console.
Google's crawlers (Googlebot, Googlebot-Image, AdsBot and others), Bingbot, DuckDuckBot, Applebot, YandexBot, AI crawlers such as GPTBot, ClaudeBot, Google-Extended and PerplexityBot, social preview bots and SEO tool crawlers. You can also type any other crawler name.
A 404 or other 4xx means there is no robots.txt, so crawlers may crawl everything. A 429 or 5xx error is treated by Google as a full block while it lasts, so server errors on /robots.txt can pause crawling of the whole site.
No. Google ignores Crawl-delay, and it stopped supporting Noindex in robots.txt in 2019. Bing and some other crawlers honor Crawl-delay. The tester flags both so you know they have no effect on Google.
It uses Google's published robots.txt specification and the same matching logic, so results should agree for standard files. Search Console remains the final word for how Google sees your live site, including cached copies.
It is free with no sign-up. Text you paste is analysed in your browser and never sent anywhere. When you fetch a live file, the file is downloaded through a small server function and returned to your browser. Nothing is saved.

More free SEO tools

Crawling and indexing are connected: use these tools together to keep search engines pointed at the right pages.

Call WhatsApp SEO Audit