WebmasterID logoWebmasterID
Robots & crawl control

How to block all bots in robots.txt

A single robots.txt group can ask every compliant crawler to stay off your whole site. This page gives the exact rule and is blunt about the caveats: robots.txt is advisory rather than enforced, blocking search crawlers can remove you from results, and it is not a security boundary.

Verified against primary sources

The rule

To ask every compliant crawler to avoid the entire site, use the default group with a root Disallow:

User-agent: * Disallow: /

The * matches any crawler that does not have its own more specific group, and Disallow: / covers every path.

The caveats

This rule is widely misunderstood. It is advisory — compliant crawlers honour it, but nothing enforces it, so it is not a way to protect content. More importantly, blocking search crawlers like Googlebot and Bingbot can remove your pages from search results over time, because they can no longer recrawl them.

It is also not the way to deindex a single page: if a blocked URL is linked elsewhere it can still appear in results without a snippet. To keep a page out of search, allow crawling and use a noindex signal instead.

How it appears in analytics and logs

A block-all robots.txt means compliant crawlers should request nothing. If you still see crawler hits on disallowed paths, those clients are ignoring robots.txt and warrant closer inspection.

Diagnostic use case

Discourage all compliant crawling site-wide (for example on a staging host) while understanding that this does not stop non-compliant clients.

What WebmasterID can help detect

WebmasterID lets you see which crawlers continue to hit blocked paths after a block-all rule, helping you distinguish compliant crawlers from clients that disregard the standard.

Common mistakes

Privacy and accuracy notes

Blocking all bots is not access control. The file is public, and non-compliant clients can ignore it, so private content still needs authentication.

Related pages

Sources and verification notes

Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.