Practical guideUpdated

robots.txt disallow all: how it works and when to use it

To ask every crawler to stay out of an entire site, put a robots.txt file at the root containing two lines: User-agent: * and Disallow: /. Compliant crawlers, including Googlebot and Bingbot, will stop crawling it. It does not password-protect anything, it does not remove pages already indexed, and blocked URLs can still appear in search from links. For staging sites, use authentication instead.

Disallow all is the most powerful line in robots.txt and the one most often deployed by accident. This page gives the exact syntax for blocking everything, blocking all but one bot, and blocking everything except some paths, then covers what the rule does not do and how to protect a live site from it.

By , Founder, SerionFlow

What we measured ·

What Google shows for "robots.txt disallow all" right now

Method: Live Google results (United States, desktop, English) for "robots.txt disallow all" retrieved through DataForSEO's SERP API on 2026-10-22. Page types are our own classification of each ranking URL.

The top 9 organic results for "robots.txt disallow all" were 3 guides or explainers, 3 forum or community threads, 2 official search-engine docs pages, 1 encyclopedia. The first three were www.robotstxt.org, support.google.com, stackoverflow.com. Community threads (stackoverflow.com, webmasters.stackexchange.com, www.reddit.com) ranked on page one, a sign searchers want first-hand answers, not only vendor pages.

Google showed an AI Overview for this query, citing 7 source domains including www.robotstxt.org, searchfacts.com, webmasters.stackexchange.com, en.wikipedia.org. Pages that state the answer directly and early are the ones an Overview can quote.

People Also Ask listed: "What does disallow in robots.txt mean?"; "Is robots.txt illegal?"; "Is robots.txt still used?"; "Can robots.txt be ignored?". The sections below answer the ones within this page's scope.

Top organic results for "robots.txt disallow all", 2026-10-22
PositionDomainPage type
1www.robotstxt.orgGuide or explainer
2support.google.comOfficial search-engine documentation
3stackoverflow.comForum or community thread
4developers.google.comOfficial search-engine documentation
5searchfacts.comGuide or explainer
6en.wikipedia.orgEncyclopedia
01

The common patterns

Each pattern is a complete file; groups are separated by a blank line.

robots.txt disallow patterns
GoalRules
Block all crawlers from everythingUser-agent: * / Disallow: /
Allow everything (same as no file)User-agent: * / Disallow: (empty)
Block all except GooglebotUser-agent: Googlebot / Allow: / then User-agent: * / Disallow: /
Block everything except one folderUser-agent: * / Disallow: / / Allow: /public/
Block one AI training crawler onlyUser-agent: GPTBot / Disallow: /
02

How crawlers read these rules

A crawler follows the most specific user-agent group that matches it and ignores the others, so in the 'all except Googlebot' pattern, Googlebot reads only its own group. Within a group, Google applies the most specific matching rule by path length, and when an Allow and a Disallow are equally specific, the less restrictive Allow wins. Paths are case-sensitive. The file must be at the root of each host and protocol: a robots.txt on www does not cover a subdomain.

03

What Disallow: / does not do

It does not keep pages out of search results. If other sites link to a blocked URL, Google can index the URL without crawling it and show it with no description. It does not remove pages already indexed; they may stay until Google decides to drop them. It does not stop non-compliant bots, scrapers, or people. To remove a live site from search, allow crawling, serve noindex on every page, and use Search Console's Removals tool for urgent cases.

04

Staging sites: use authentication instead

Teams often put Disallow: / on staging environments, then copy the file to production during a launch, blocking the entire live site. Password protection or IP allowlisting on staging is safer: crawlers cannot access the content at all, and there is no robots.txt to leak into production. If you must use a staging robots.txt, generate it from environment configuration so production can never receive it.

05

Check after every deployment

Fetch /robots.txt on the live domain after each launch or migration and confirm it does not contain Disallow: / for user-agent *. Search Console's robots.txt report shows the version Google last fetched and any errors. Our free robots.txt checker tests whether specific URLs are allowed for Googlebot, Bingbot, and AI crawlers, and the robots.txt monitoring guide explains how to get alerted when the file changes. SerionFlow is the wrong tool for managing robots.txt on your site; it does not edit your server files, so changes happen in your host or CMS.

Clear answers

Frequently asked questions

What does Disallow mean in robots.txt?

+

It asks the named crawlers not to request URLs that start with the given path. Disallow: / covers every URL on the host.

Can robots.txt be ignored?

+

Yes. It is a voluntary standard. Major search engines and reputable AI crawlers follow it, but malicious bots and scrapers can ignore it.

Is robots.txt illegal to ignore?

+

robots.txt is not a law in itself. Legal questions about scraping depend on jurisdiction, terms of service, and the data involved, not on the file alone.

About the author

· Founder, SerionFlow

Shadrack builds SerionFlow's site research, page generation, and Search Console tooling, and runs the free tools these guides pair with. Search Console figures cited on these pages come from serionflow.com's own property.

Continue exploring

Related SerionFlow resources

More in Guides

All guides

Make the next move obvious

Let SerionFlow turn your market evidence into momentum.

Confirm the market, rank the opportunities that matter, create brand matched pages on your domain, and keep moving with controlled weekly intelligence.

Choose how SerionFlow uses cookies.

Essential cookies keep the site secure and working. Product analytics helps us improve reliability. Optional cookies help us remember preferences and improve campaigns. You can change optional cookies anytime in Cookie Settings.