Robots.txt Tester
Loading tool controls…
Robots.txt Tester At a Glance
A robots.txt tester evaluates whether a crawler should be allowed to request a particular URL according to the Allow and Disallow instructions in a robots.txt file. The answer depends on the selected user-agent, the URL path being checked, and the most specific matching rule. Paste the directives, enter a crawler name such as Googlebot, and supply an absolute path or complete URL. The result shows the decision, the winning instruction, and the line where that instruction appears. This is a rule interpretation rather than a live crawl or indexing report.
An apparently blocked URL is not necessarily absent from search results, and an allowed URL is not guaranteed to be indexed. Robots.txt governs crawler access; it does not replace a noindex directive on a crawlable page, password protection, or authorization. The checker deliberately works on text you provide rather than fetching any arbitrary web address, so it can analyze draft rules without depending on the target server’s accessibility. Its parser follows major Google-style matching conventions but does not claim to reproduce every normalization detail of Google’s production crawler.
How Robots.txt Tester Works
Open the site’s robots.txt content in a text editor and copy its relevant directives into the tester. For an example, enter User-agent: * followed by Disallow: /private/ and Allow: /private/public/. Select Googlebot and test /private/public/report. The more specific Allow instruction wins for that path. Testing /private/report instead produces a blocked decision because the narrower allowance does not apply. The report identifies the pattern and the source line, making it easier to understand why the two paths receive different answers.
To check a product or article page, provide the full public URL or its path beginning with a slash. Query parameters participate in path matching where the rule includes them. Change the crawler name to compare specific and general user-agent groups. Re-run the same path whenever you alter directives rather than assuming the first result carries over. A plain Disallow: with no value has no blocking effect, while a broad Disallow: / applies to every path covered by that group unless a more specific allowance wins.
Understanding Robots.txt Groups and User Agents
A robots.txt file can contain one or more groups beginning with User-agent directives. A group describes which crawlers should use the subsequent rules. The wildcard user-agent * is the general fallback for crawlers that do not have a more specific group. When you add a crawler-specific group, the crawler may use that group instead of simply combining every rule from the entire file. This is why testing a single Disallow line in isolation may produce the wrong expectation: the surrounding user-agent structure is part of the instruction.
Crawler names are not interchangeable. Googlebot, Googlebot-Image, and other agents may be treated differently where matching groups exist. Some third-party services interpret extensions in their own way, and not every crawler obeys robots.txt at all. The checker reports the group or groups it selected so that you can inspect the context rather than seeing only a yes-or-no answer. A missing matching group normally means the default behavior is to permit crawling, which may surprise website owners who expected a file without rules to provide automatic protection.
How Allow, Disallow, Wildcards, and End Anchors Affect Matches
An Allow rule describes a URL-path pattern that the named crawler may fetch; Disallow identifies a path pattern that should not be requested. When more than one rule matches, relative specificity matters. A rule for /catalog/private/ has more literal matching characters than a rule for /catalog/, so it can change the result for a narrow subset of pages. If matching rules have equal specificity, Google-style evaluation gives Allow priority. This is distinct from a firewall, where rule order and a different set of matching semantics may apply.
The asterisk acts as a wildcard, while a dollar sign at the end anchors a pattern to the end of the tested path. For example, a rule ending in .pdf$ targets paths with that suffix rather than every URL containing .pdf somewhere in the middle. URL encoding introduces further complications: reserved characters, capitalization, and non-ASCII paths can change what a crawler compares. The tester explains common text-pattern cases, but unusual encoding should be checked against the search engine’s published parser behavior and observed crawling records.
A Product and Faceted-Navigation Example
Consider an online shop that wants search engines to reach product pages while discouraging crawler access to internal cart URLs. Disallow: /cart/ is a sensible starting rule, provided the real cart paths begin with that segment. A more ambitious rule such as Disallow: /*?sort= can affect faceted product lists where the sorting parameter appears in different positions. The position of a query parameter matters if the pattern is too literal, and changing a path from /shop/ to /products/ can make an existing rule ineffective.
Before publishing these rules, test several representative URLs: the standard product URL, a paginated category, a sorted category, and an internal account route. Record which ones must remain crawlable. The SERP snippet preview is useful for reviewing how a public page title and description might appear, but an attractive snippet does not overcome a crawl block. Search discoverability requires both content worth indexing and a technical configuration that permits the relevant page to be retrieved.
Robots.txt and Search Console Are Not Equivalent Checks
Search Console reports what Google has observed about a property, but a local rule tester evaluates a supplied robots file under stated assumptions. An allowed result does not mean Google visited the page, and a disallowed result does not prove that Google already learned about the restriction. Site moves, content delivery networks, cached rules, and inconsistent responses between hostnames can delay or complicate the behavior seen by crawlers. Confirm that the production file is served from the correct scheme, host, and root location.
You also need to distinguish a crawl restriction from a removal request. A URL blocked by robots.txt can sometimes appear in search results based on links pointing to it, even when Google cannot fetch its contents. If you need a page excluded from indexing, a crawlable noindex instruction or another appropriate removal method may be necessary. Sensitive documents should require authentication or be removed; neither robots directives nor snippet styling protect confidential files.
Common Mistakes That Produce Misleading Decisions
One common error is testing the site homepage against /private/ and assuming the result applies across the site. Another is placing a User-agent line after directives without recognizing that it begins a new group. A third is testing a path on the wrong host or protocol. Robots.txt is scoped to the site origin on which it is served, so separate subdomains may require separate files. A sitemap directive provides crawler discovery hints but does not automatically grant access to pages disallowed elsewhere.
The tool identifies unknown directives and malformed lines without silently treating them as broad permissions or denials. It does not retrieve external robots.txt documents or reproduce the effects of HTTP 404, 5xx responses, redirects, byte-order marks, or robots file size limits on every search engine. If you are diagnosing real crawling problems, compare its interpretation with the response headers served to the crawler, your server logs, and the crawler-specific documentation.
A Practical Review Before Publishing Changes
Make a short test set of important pages and sections before replacing a live robots file. Include at least one page from every major template, all product or editorial sections that need search visibility, and paths you intentionally want to discourage crawlers from visiting. Where the site uses parameters, include examples with multiple query values and percent-encoded characters. Run those URLs under the user-agents that matter to the website rather than relying on a single wildcard test.
After deployment, fetch the live robots.txt URL directly and confirm it contains what you intended to publish. Audit the web diagnostics tools against real search visibility data rather than treating a local rule check as a ranking score. Careful review avoids two costly extremes: a mistaken sitewide block that prevents fetching important pages, and a broad allowance that exposes routes which were never intended to be public.
Frequently Asked Questions
Does robots.txt stop a page from appearing in Google?
Not necessarily. Disallow normally prevents crawling of the matching resource, but a URL may still be discovered from external links. A page intended to stay out of search may need a crawlable noindex instruction or another appropriate removal procedure. Confidential content requires access controls.
Does the tester fetch my live robots.txt file?
No. It interprets the directives pasted into the text field. Copy the actual production contents if you want to evaluate current rules, and separately confirm the file’s HTTP response and hostname in a browser or command-line request.
What happens when Allow and Disallow both match?
The most specific matching rule takes precedence under Google-style interpretation. If the equally specific matching rules conflict, an Allow rule generally wins. Other crawlers may implement different matching rules, so their documentation remains important.
Can I test wildcard user-agent rules?
Yes. The tester recognizes the * group and chooses a more specific matching crawler group where one is present. It also evaluates * within URL-path patterns and a final $ anchor, with documented limitations for advanced character and encoding cases.
Is an allowed URL guaranteed to be indexed?
No. Crawling permission only removes one potential obstacle. Search engines make additional decisions based on content, canonicalization, duplication, server accessibility, quality, and many other signals. This tool does not determine whether a page is currently in the index.
Can robots.txt replace password protection?
No. A robots directive is a public instruction to cooperative crawlers, not an authorization mechanism. It should never be relied on to secure private downloads, customer records, account pages, or confidential business information.
Why do the results differ for Googlebot and Googlebot-Image?
A robots file can specify different user-agent groups, and a crawler may select a more specific group instead of the wildcard rules. If the selected group contains different directives, the same URL may receive a different outcome.