# Robots disallow

Source: https://delisthq.com/blog/2026-12-02-robots-disallow/

Published 2026-12-02

A Disallow line in robots.txt is an instruction to crawlers about which paths they may request. It is not a deletion tool, not a security control, and not a way to remove a page from a search index. That distinction, which Google's own robots.txt documentation states bluntly, is where most of the confusion around this file starts.

Related reading on this site: [Credential stuffing: how it works](../2026-12-01-credential-stuffing-how-it-works-what-it-costs-the-target-and-where-it-falls-short/) [Defending against credential stuffing](../2026-12-01-defending-against-credential-stuffing-controls-in-the-order-operators-deploy-them/).

## The syntax, exactly as crawlers read it

A robots.txt file is plain text at the root of the host, built from groups. Each group opens with a User-agent line naming the crawler, followed by Disallow and Allow rules whose values are path prefixes starting with a slash. Disallow: / blocks the whole site. Disallow: /private/ blocks that directory. An empty Disallow blocks nothing. Field names are case-insensitive; path values are case-sensitive, so /Admin and /admin are different rules. The file follows the Robots Exclusion Protocol, standardised as RFC 9309 in 2022.

When Allow and Disallow both match a URL, Google applies the more specific rule, the one with the longer path, and if they tie, the less restrictive Allow wins. Wildcards do real work here: an asterisk matches any sequence of characters, and a dollar sign anchors the end of the URL, which is how a rule like Disallow: /\*.pdf$ targets one file type.

## What Disallow cannot do

It cannot de-index anything. Google is explicit that a disallowed URL can still appear in search results if other pages link to it, shown without a snippet, because the crawler never fetched the page to learn anything about it. Keeping a page out of the index is a different mechanism: a noindex meta tag or X-Robots-Tag header, on a page the crawler is allowed to fetch so it can read the instruction. Google stopped honouring noindex lines written inside robots.txt in September 2019, a change old guides still get wrong.

It also cannot keep a secret. The file is public, anyone can read it, and the paths listed in it are a map of what the site owner would rather crawlers skipped. Sensitive material belongs behind authentication, not behind a Disallow line that advertises its location.

## Testing before it costs you

One wrong line, Disallow: / typed during a redesign and left in place, can pull a whole site out of crawling. Test the file in Google Search Console's robots.txt tester against your money pages before and after any change, keep the Sitemap line in the file pointing at the current sitemap, and treat every edit as a production change, because to a crawler it is one.

## Frequently asked questions

### Does Disallow remove a page from Google?

No. Disallow stops crawling, not indexing. A blocked URL that other pages link to can still appear in results without a snippet. To remove a page from the index, let Google crawl it and serve a noindex tag, or delete the page and let the result decay through the outdated content process.

### What is the difference between Disallow: / and Disallow: /folder/?

Disallow: / blocks every path on the host. Disallow: /folder/ blocks only paths under that directory. The trailing slash matters: /folder without it also matches /folder-notes and /folder.html, because rules are prefix matches.

### Can robots.txt hide a private page?

No. The file is public and the rule advertises the path. Well-behaved crawlers honour it and everyone else ignores it. Private content needs authentication; robots.txt is a crawling courtesy, not access control.
