Skip to main content
Free tool

Robots.txt tester

Paste robots.txt, choose a crawler and check whether the rules allow it to fetch your URL.

  • Free
  • No account required

Result

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.

About the tool

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.

In practice

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.

Step by step

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.

  1. Copy the current file from the server

    Open https://example.com/robots.txt and copy the whole file. It applies only to the host, protocol and port where it lives, so a subdomain has its own robots.txt.

  2. 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 /Blog and /blog are two different URLs.

  3. 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.

  4. 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.

Examples

Robots.txt rule examples

Three cases where a single line changes the result for many URLs.

Prefix instead of a directory
Before
User-agent: *
Disallow: /cart
# also blocks /cart-gift-ideas
After
User-agent: *
Disallow: /cart/

The trailing slash limits the rule to the /cart/ directory and the URLs under it.

An exception with a longer pattern
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.

A staging file on production
Before
User-agent: *
Disallow: /
After
User-agent: *
Disallow: /admin/

Sitemap: https://example.com/sitemap.xml

Disallow: / blocks the whole site. This line often carries over from staging during a deployment.

Common mistakes

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.

Numbers and sources

Robots.txt in the standard, in Google documentation and in data

ValueWhat it meansSource
500 KiBGoogle’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 hHow 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
5Minimum number of consecutive robots.txt redirects a crawler should follow under RFC 9309. Google treats anything beyond that as a 404.IETF, RFC 9309
4xxGoogle 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 descriptionHow a URL blocked in robots.txt can appear in results when other pages link to it.Google Search Central, robots.txt introduction

Sources checked:

Glossary

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.
SEO module in Insight

File or code ready? Check the result on the live page

Indexability, metadata and structure, with priorities and a client report.