Free tool

Robots.txt tester

Paste a robots.txt file, enter a URL or path and pick a crawler. The tester tells you whether that crawler may read the address, quotes the exact rule that decides, lists every group and Sitemap line in the file, and flags mistakes such as rules outside a group or a Disallow: / that blocks the whole site.

It reads the file the way RFC 9309 and Google's documentation describe, and the way Google's open-source parser does where they leave a detail open. Everything runs in your browser: nothing is fetched, sent or saved, so you can test a file before it goes live.

Test your robots.txt

Open your-domain.com/robots.txt, copy all of it and paste it here. 12 lines, 2 groups.

Crawler (user agent)

Google Search.

Blocked by "Disallow: /checkout" on line 10.

Result for Googlebot

Blocked

/checkout/step-1

Blocked by "Disallow: /checkout" on line 10.

Deciding rule
Disallow: /checkoutline 10
Group followed
The group naming Googlebot (line 8).

A robots.txt file only covers the host it is served from, so make sure this is the file at example.com/robots.txt: www, other subdomains, http and https each have their own.

What to check in this file (0)

Nothing to flag in this file.

Groups in this file (2)

  1. User-agent: *

    from line 2

    • Disallow: /cartline 3
    • Disallow: /searchline 4
    • Allow: /search/helpline 5
    • Disallow: /*.pdf$line 6
  2. User-agent: Googlebot

    from line 8Used for this test

    • Disallow: /cartline 9
    • Disallow: /checkoutline 10

Sitemaps (1)

  • https://example.com/sitemap.xmlline 12

The example file is made up for a small shop. Replace it with your own; the result updates as you type.

How to find your robots.txt

A site's robots.txt is always at the top level of its host. Open https://example.com/robots.txt with your own domain in place of example.com, select all of the text and paste it into the tester.

  • Each host has its own file. Google applies the rules only to the host, protocol and port the file is served from, so www.example.com/robots.txt doesn't cover shop.example.com, and the https file doesn't cover http.
  • No file means no rules. If the address shows a not found page, Google treats any 4xx answer except 429 as if there were no robots.txt and crawls without restrictions.
  • A server error is different. When robots.txt answers with a 5xx error, Google stops crawling the site for the first 12 hours, then uses the last good copy it read for up to 30 days.
  • Where to edit it. On Shopify: Online Store, Themes, Edit code, then robots.txt.liquid, which you add first with Add a new template, robots, if your theme doesn't have it. On WordPress: your SEO plugin's file editor (Yoast: Tools, File editor; Rank Math: General Settings, Edit robots.txt). Elsewhere: the robots.txt file at the root of your site.
  • What Google last read. Search Console's robots.txt report lists the files Google found for the top 20 hosts of your site and when it last checked each, and URL Inspection tells you whether a page is blocked. See how to set up Search Console.

How robots.txt matching works

A crawler reads the file in three steps, and this tester does the same:

  1. Pick the group. A group is one or more User-agent lines followed by their rules. A crawler follows every group that names its product token, combined into one. Case doesn't matter, and text after the name is ignored, so googlebot/1.2 is Googlebot. Only when no group names the crawler does it follow the * group; with neither, no rules apply.
  2. Find the matching rules. A rule matches when the address's path, query string included, starts with the rule's path. Paths are case-sensitive. * stands for any run of characters, and $ at the end means the address must end there.
  3. Take the most specific. The matching rule with the most characters wins. When an Allow and a Disallow are equally long, Google uses the least restrictive rule, so Allow wins. When nothing matches, the address is allowed.

Google reads only User-agent, Allow, Disallow and Sitemap lines and ignores the rest. Sitemap lines belong to no group, and a Sitemap or unknown line between two User-agent lines doesn't split them into separate groups.

Worked examples

These results come from the tester's own code, run on the example file:

# Example robots.txt for a small online shop
User-agent: *
Disallow: /cart
Disallow: /search
Allow: /search/help
Disallow: /*.pdf$

User-agent: Googlebot
Disallow: /cart
Disallow: /checkout

Sitemap: https://example.com/sitemap.xml
CrawlerAddressResultDeciding ruleWhy
Googlebot/checkout/step-1BlockedDisallow: /checkoutline 10Googlebot has its own group, and /checkout matches the start of the path.
Googlebot/guides/returns.pdfAllowedNoneGooglebot follows only its own group, so the * group's PDF rule doesn't apply to it.
Bingbot/guides/returns.pdfBlockedDisallow: /*.pdf$line 6Bingbot has no group of its own, so it follows the * group, where /*.pdf$ matches.
Bingbot/guides/returns.pdf?download=1AllowedNone$ means the address must end there, and the query string counts as part of the address.
Bingbot/search/help/shippingAllowedAllow: /search/helpline 5Both /search and /search/help match; the longer rule wins.
Bingbot/search?q=bootsBlockedDisallow: /searchline 4Only Disallow: /search matches, so the search results page is blocked.
Bingbot/CartAllowedNonePaths are case-sensitive: /cart doesn't match /Cart.

Google's own examples

Google's documentation shows which rule wins in six cases. Each file below is a * group with the two rules shown, and the tester gives Google's answer for every one:

AddressRulesResultWhy
/pageallow: /p, disallow: /AllowedAllow: /pline 2The more specific rule
/folder/pageallow: /folder, disallow: /folderAllowedAllow: /folderline 2Conflicting rules: the least restrictive wins
/page.htmallow: /page, disallow: /*.htmBlockedDisallow: /*.htmline 3The longer rule matches more of the address
/page.php5allow: /page, disallow: /*.phAllowedAllow: /pageline 2Equally long: the least restrictive wins
/allow: /$, disallow: /AllowedAllow: /$line 2The more specific rule
/page.htmallow: /$, disallow: /BlockedDisallow: /line 3allow: /$ covers only the homepage

Common robots.txt mistakes

  • Blocking a page to keep it out of Google. robots.txt stops crawling, not indexing. A blocked page can still appear in results without a description, and Google can't see a noindex tag on a page it may not crawl. Use noindex and leave the page crawlable, or put it behind a password.
  • A Disallow: / left in place. One line under User-agent: * keeps every crawler without a group of its own out of the whole site. The tester flags it.
  • A crawler's own group that drops the * rules. Once Googlebot (or any crawler) has a group, it ignores the * group, so rules meant for everyone stop applying to it.
  • Paths without a leading slash, or full addresses. Disallow: private and Disallow: https://example.com/private match nothing. Write Disallow: /private.
  • The wrong case. Disallow: /Products doesn't block /products.
  • Lines Google ignores. Crawl-delay, Noindex and Host do nothing for Google. Google's parser reads a few common misspellings, such as Dissallow, and a line with no colon after the field, but other crawlers may skip them, so the tester flags both.
  • Rules before the first User-agent line. They belong to no group, so crawlers ignore them.
  • The wrong host. Rules in www.example.com/robots.txt don't apply to shop.example.com.

What this tester doesn't do

  • It doesn't fetch anything. It tests the text you paste, so it can't see how your server answers /robots.txt or which copy a crawler has cached. Google generally caches the file for up to 24 hours.
  • It follows the standard and Google. Other crawlers can read edge cases differently, and some fall back to another crawler's group when none names them: Apple says Applebot follows Googlebot's rules when robots.txt mentions Googlebot but not Applebot.
  • It doesn't check the pages themselves. A page can also stay out of search because of a noindex tag or header, a canonical pointing elsewhere or a login wall.
  • It doesn't test as the search engines do. For that, use URL Inspection in Google Search Console, or the robots.txt tester in Bing Webmaster Tools, which checks a URL as Bingbot would. See how to set up Bing Webmaster Tools.

Checking what AI crawlers may read? The AI crawler checker runs the same matching for GPTBot, ClaudeBot, Google-Extended, PerplexityBot and more, and explains what blocking each one changes. Running a Shopify store? The Shopify SEO checklist covers robots.txt.liquid along with the rest.

Frequently asked questions

How does a robots.txt tester decide if a URL is blocked?

It finds the group for your crawler: every group naming its token, else the * group. Among that group's rules, the one matching the most characters of the path wins, and Allow wins a tie. When no rule matches, the URL is allowed. This tester follows RFC 9309, Google's documentation and Google's open-source parser.

Which rule wins when Allow and Disallow both match?

The longer one, because it is more specific: Allow: /search/help beats Disallow: /search for /search/help/shipping. When both are the same length, Google uses the least restrictive rule, so Allow wins. Wildcards count as characters, so Disallow: /*.htm beats Allow: /page for /page.htm.

Does blocking a page in robots.txt keep it out of Google?

No. robots.txt controls crawling, not indexing, and Google says a blocked page's address can still appear in results, without a description. To keep a page out, add a noindex meta tag or header and leave the page crawlable so Google can see it, or put the page behind a password.

Why does Googlebot ignore my User-agent: * rules?

Because it has a group of its own. A crawler follows only the groups that name it, combined, and ignores the * group entirely. When you add a Googlebot group, repeat in it every rule from the * group that you still want Googlebot to follow.

Is robots.txt case-sensitive?

Partly. Field names such as Disallow, and the crawler names in User-agent lines, are not. Paths are: Disallow: /cart doesn't block /Cart. The file itself must be called robots.txt, in lower case, at the top level of the host it covers.

Does this tester fetch my robots.txt or send it anywhere?

No. You paste the file and everything is worked out in your browser: nothing is fetched, sent to our server or saved. To see what Google itself last read, use the robots.txt report and URL Inspection in Google Search Console.

Sources

  1. RFC 9309: Robots Exclusion Protocol, IETF. Published September 2022. Checked October 19, 2026.
  2. How Google interprets the robots.txt specification, Google Search Central. Last updated August 31, 2026. Checked October 19, 2026.
  3. Introduction to robots.txt, Google Search Central. Last updated December 10, 2025. Checked October 19, 2026.
  4. Block Search indexing with noindex, Google Search Central. Last updated December 10, 2025. Checked October 19, 2026.
  5. Google robots.txt parser and matcher library, Google on GitHub. Checked October 19, 2026.
  6. robots.txt report, Search Console Help. Checked October 19, 2026.
  7. Bing Webmaster Tools makes it easy to edit and verify your robots.txt, Bing Webmaster Blog. Published September 4, 2020. Checked October 19, 2026.
  8. About Applebot, Apple. Published September 4, 2026. Checked October 19, 2026.

Google's parser, published as open source, is the reference for details the documentation leaves open: a * followed by more text still names every crawler, only Allow and Disallow lines end a run of User-agent lines, a few misspelled field names and a missing colon are still read, a rule's length counts its percent-encoded characters, and an Allow for an index.html page also allows its folder's own address.

Let Site Health watch your robots.txt

BlogAmplify's Site Health reads your robots.txt and checks every page in your sitemap against Googlebot's rules. It flags a file that blocks your whole site, sitemap pages robots.txt blocks (with the rule that blocks each one) and a robots.txt that doesn't name your sitemap, with fix steps for Shopify, WordPress and other platforms. Validate fix reads the pages again once you have changed the file. See everything Site Health checks.

Growth: Card required. Free for 3 days, then $99/mo. Cancel before then and pay nothing.