tooldura
SEO Tools

Robots.txt Blocks Crawling, Not Indexing

T
tooldura editorial
9 min readUpdated November 1, 2026Open tool →

A site owner finds an embarrassing page in Google, adds a Disallow line for it, and waits. Weeks later the page is still listed, now with no description under it, and it has become harder to remove than it was before the edit. The file did what it promises. It asked crawlers not to fetch the page, which is a different request from asking a search engine to forget it.

Crawling and Indexing Are Separate Steps

Crawling is fetching a URL. Indexing is storing what was found so that it can appear in results. Robots.txt only speaks to the first. Google's documentation is blunt about it, calling the file "not a mechanism for keeping a web page out of Google".

A search engine can know a URL exists without ever fetching it, because other pages link to it, and the link text says something about what it holds. So a disallowed URL can still be listed. Google's wording is that the URL "can still appear in search results, but the search result won't have a description", since the description would have come from the content it wasn't allowed to read.

The standard agrees on the limits. RFC 9309, which made the Robots Exclusion Protocol an internet standard in 2022, says these rules "are not a form of access authorization". The file is public, and anyone can read it, which also means a list of secret paths in robots.txt is a list of where to look. Well-behaved crawlers follow it because they choose to.

⚠️

Blocking a page can keep it in the index

A noindex tag is the correct way to remove a page, but Google has to fetch the page to see the tag. Its documentation says that for noindex to work, the page "must not be blocked by a robots.txt file". Disallow plus noindex is the combination people reach for to be doubly sure, and the Disallow is what stops the noindex from being read.

Which Control Does Which Job

What each mechanism does to one URL, based on Google Search Central's documentation.

You useCrawled?Can be listed?Right for
Disallow in robots.txtNoYes, without a descriptionSaving crawl budget on URLs that don't matter, such as filtered and sorted lists
noindex tag or headerYesNo, once Google has seen itKeeping a public page out of results
Password protectionNo, it gets an errorNot its contentAnything that must stay private
Removals tool in Search ConsoleUnchangedHidden for about six monthsAn urgent fix while a permanent one takes effect
404 or 410 statusYesDropped over timeA page that is gone for good

A Crawler Reads One Group and Ignores the Rest

A file is divided into groups, each starting with one or more User-agent lines. The mistake people make is assuming the groups stack, with User-agent: * as a base layer and named groups added on top. They don't. Google's specification says its crawlers use only the single group with the most specific match, and every other group is ignored. RFC 9309 falls back to * only "if no matching group exists".

Take a file with Disallow: /admin/ under User-agent: *, and then Disallow: /tmp/ under User-agent: Googlebot. Bingbot is blocked from /admin/. Googlebot is not, because it found a group naming it and stopped looking. The moment you add a group for one crawler, you have to repeat in it every rule that should still apply.

The order of groups doesn't matter, and neither does the case of the crawler's name. Two groups naming the same crawler are merged, but a named group is never merged with *. Some crawlers also answer to a broader token: Googlebot-Image follows a Googlebot group when it has none of its own, and Apple says Applebot does the same, so a group written only for Googlebot reaches Apple's crawler too. A few skip the wildcard altogether. Google says AdsBot-Google ignores *, so User-agent: * plus Disallow: / does not stop it, and it needs a group of its own.

Longest Rule Wins: Conflicts Worked Through

Line order never matters. The rule with the most characters in its path wins, and Allow wins a tie. Every row can be reproduced in the tester.

RulesURLResultWhy
Allow: /p and Disallow: //pageAllowed/p (2) is longer than / (1)
Allow: /folder and Disallow: /folder/folder/pageAllowedSame length, so Allow wins
Allow: /page and Disallow: /*.htm/page.htmBlocked/*.htm (6) beats /page (5), and the * counts as a character
Allow: /$ and Disallow: //Allowed/$ (2) matches only the home page and is longer
Allow: /$ and Disallow: //page.htmBlocked/$ doesn't match, so / is all that is left
Disallow: /shop/ and Allow: /shop/sale//shop/sale/shoesAllowedThe more specific Allow is longer

How a Path Is Matched

A rule matches from the start of the path, and that catches people out in both directions. Disallow: /fish also blocks /fish.html, /fishing/ and /fish?id=1, but not /catfish or /desert/fish. Ending it with a slash, as /fish/, narrows it to what is inside that folder and no longer blocks /fish itself.

Paths are case-sensitive, so /Fish and /fish are different rules, while field names and crawler names are not. There are only two special characters. * stands for zero or more of any character, and $ at the end of a rule anchors it to the end of the URL. So /*.pdf$ matches /report.pdf but not /report.pdf?download=1. To block a PDF whatever follows it, leave the $ off.

The query string is part of what gets matched, which is how /*?sort= works, and also why it misses /shoes?color=red&sort=price, where sort isn't the first parameter. The online store preset in the tool adds /*&sort= for that reason.

Encoding is compared after normalizing. RFC 9309's own table treats /foo/bar/%62%61%7A and /foo/bar/baz as the same path, and /foo/bar/ツ as the same as its percent-encoded form. An encoded slash (%2F) stays different from a real one.

The Mistakes That Cost Traffic

None of these make the file invalid, so nothing warns you. Each one shows up later as a drop in crawling or a page that won't leave the index.

1

Disallow: / shipped from staging

The classic. A staging site blocks everything, the file goes live with the launch, and the new site slowly falls out of results. Check the live file on launch day, and test your home page and one important page against it.

2

Blocking CSS and JavaScript

Google renders pages. Its documentation warns against blocking resources if their absence makes a page harder to understand, and a page that renders as unstyled text can be misjudged. Old templates that block /assets/ or /*.js$ are the usual source.

3

Writing the domain into the rule

Disallow: https://example.com/private/ matches nothing, because rules compare against the path and every path starts with a slash. The same goes for Disallow: private/. The file looks fine and blocks nothing.

4

Expecting one file to cover subdomains

A file applies to the exact protocol, host and port it is served from. blog.example.com doesn't read the file on www.example.com, and a robots.txt inside a subfolder is never checked at all.

5

Using Crawl-delay or noindex in the file

Google doesn't support Crawl-delay, though some other crawlers, ClaudeBot among them, do read it. A Noindex: line stopped working in Google in September 2019, when it dropped support for unofficial rules. Neither causes an error, so a file can carry them for years without anyone noticing that they do nothing.

What Happens When the File Can't Be Fetched

Google's documented behaviour. RFC 9309 sets the same split: 4xx means crawlers may access anything, and 5xx means they must assume everything is disallowed.

Response for /robots.txtCrawlingWhat Google does
2xxBy the fileUses the file as served
3xxBy the targetFollows at least five redirects, then treats it as a 404
4xx, except 429UnrestrictedActs as if no file exists
5xx or network failure, first 12 hoursStoppedKeeps retrying the file
5xx, up to 30 daysBy the last copyUses the last good copy, or crawls without restrictions if it has none
5xx, after 30 daysDependsCrawls without restrictions if the site is otherwise up, and stops if it isn't

A Broken File Is Worse Than a Missing One

The table above holds a surprise. A missing robots.txt costs nothing, and a site with no restrictions to declare doesn't need one. A robots.txt that returns a server error is another matter, because Google stops crawling the whole site for the first twelve hours rather than risk fetching something it was told not to. Firewalls and bot protection are a common cause: they answer the request with an error, the site looks fine in a browser, and crawling quietly stops.

Two other limits are worth knowing. Google generally caches the file for up to 24 hours, so an edit doesn't apply the second you save it, and the cache can last longer when refreshing fails. It also reads only the first 500 KiB and ignores the rest, which real files seldom reach unless they are generated from a list of URLs.

AI Crawlers Are Not All the Same Thing

From each company's own crawler documentation as of November 2026. These lists change, so check the source before relying on one.

TokenCompanyWhat blocking it does
GPTBotOpenAISignals that content should not be used to train its models
OAI-SearchBotOpenAIKeeps the site out of ChatGPT search answers, apart from navigational links
ChatGPT-UserOpenAIFetches pages when a person asks, and OpenAI says robots.txt rules may not apply
ClaudeBotAnthropicSignals that future content should be left out of training data
Claude-SearchBotAnthropicPrevents indexing for its search, which may reduce visibility in answers
Claude-UserAnthropicPrevents fetching when a person asks a question
Google-ExtendedGoogleStops use for training Gemini, with no effect on Google Search
PerplexityBotPerplexityKeeps the site out of Perplexity's search results
Perplexity-UserPerplexityFetches pages when a person asks, and generally ignores robots.txt
Applebot-ExtendedAppleOpts out of training Apple's AI models, with no effect on Search ranking
Meta-ExternalAgentMetaOpts out of crawling for training Meta's AI models
Meta-WebIndexerMetaMakes it harder for Meta AI to cite and link to the site
AmazonbotAmazonOpts out of crawling that improves its products and may train its models
Amzn-SearchBotAmazonKeeps the site out of search in Amazon products such as Alexa
DuckAssistBotDuckDuckGoRemoves the site as a source for AI answers, with no effect on regular rankings

Training and Search Are Different Decisions

Blocking everything with "AI" in its description is the common reflex, and it can cost you something you wanted. A site that objects to training can block GPTBot and ClaudeBot while still appearing as a cited source, because those companies run their search crawlers under other tokens. A site that wants neither has to list both kinds.

Google-Extended trips people up in the opposite way. It has no crawler behind it, and its documentation says it has no separate HTTP user agent. It is a token that tells Google how content fetched by its other crawlers may be used. Blocking it won't change your server logs and won't affect your rankings.

The fetchers triggered by a person are the ones this file controls least. When someone asks an assistant about your page and it goes to read it, OpenAI and Perplexity both say robots.txt may not apply. If a page really must not be read by those tools, it needs a login, not a line in a text file.

Test your file before Google does

Paste your robots.txt, add the URLs you care about and see which line decides each one.

Open Robots.txt Generator & Tester →

Checking a File Properly

Test the pages that must stay crawlable, not only the ones you meant to block. A rule that blocks too little is usually harmless, while a rule that catches your product pages is what costs money, and you only find it by testing those product URLs.

Run each URL as each crawler you have a group for, because a group for Googlebot can give it different answers from the ones everything else gets. Then compare with what Google has. The robots.txt report in Search Console shows the version it last fetched, when it fetched it and any errors, which tells you whether your edit has reached it yet.

Frequently Asked Questions

Found this guide useful? Pass it on.

Related Tools

Keep Reading