indexing.io
All posts
Technical SEO

Block Googlebot: How to Do It Without Tanking Your SEO

Block Googlebot with robots.txt or noindex? They do different jobs, and blocking the crawl never removes a page from the index. Here is the right tool for each.

By the Indexing team

July 2026 · 7 min read

Coverage Console
White-hat · official methods
Presets

Ready to check coverage

Paste a sitemap to sweep every URL for index status, then submit the missing ones through the official Google Indexing API and Bing IndexNow.

Not indexed Discovered, not indexed Indexed ✓

Coverage

indexed

Submitting via

Avg time to index

URLs submitted

Now eligible

Live, interactive · sample data · official methods only

Official Google Indexing API · Bing IndexNow · verified sitemaps · no spam, no PBNs

How do I block Googlebot? Add Disallow rules to robots.txt to stop crawling, or a noindex tag to stop indexing. Those are two different jobs. robots.txt stops Googlebot fetching the page; it does not remove a page already in the index, and it hides any noindex tag you added, because Google can never crawl the page to read it.

That distinction is where most people wreck their own search visibility. They want a page gone from Google, they reach for robots.txt because it is the file everyone talks about, and six weeks later the URL is still sitting in the results with no snippet under it and no way to fix it. Blocking is not removal. Pick the tool that matches the job you actually have.

How do I block Googlebot from a page?

If you want Googlebot to stop fetching one page, disallow its path in robots.txt. If you want the page out of Google's results, do the opposite: let Googlebot crawl it and serve a noindex meta tag or X-Robots-Tag header. If it's private, put it behind a login. The choice depends entirely on your goal, not on which file is easiest to edit.

Here's the full mapping, because the wrong tool for the right goal is the single most common technical SEO mistake on this topic.

What you actually wantCorrect methodThe gotcha
Stop Googlebot crawling a path (save crawl budget, protect a server) Disallow in robots.txt URLs already indexed stay indexed, often shown with no snippet
Remove a page from the index / keep it out noindex meta tag or X-Robots-Tag HTTP header The page must stay crawlable. Disallowing it makes the noindex unreadable and therefore useless
Hide genuinely private or sensitive content Authentication (login, HTTP auth, IP allowlist) robots.txt is a public file. Listing a secret path in it advertises the path to everyone
Stop one specific crawler (images, news, ads) Named User-agent block in robots.txt AdsBot crawlers ignore User-agent: * entirely and must be named explicitly
Hide something fast, right now Search Console Removals tool It's a temporary hide of roughly six months, not a removal. Fix the underlying cause meanwhile
Keep a page out of results but let it pass link equity noindex alone (no disallow) Google eventually treats long-lived noindex pages' links as nofollow, so don't rely on it forever

What does "User-agent: * Disallow: /" actually do?

It tells every compliant crawler not to fetch anything on the host. It does not delete you from Google. Pages Google already knows about can stay in the index, and Google says plainly that it "can't index the content of pages which are disallowed for crawling, but it may still index the URL and show it in search results without a snippet." You get the worst of both: still listed, no control over the listing.

That's the full "robots txt block all" recipe, and it's a fine tool for exactly one situation: a server that should never have been reachable by a crawler in the first place, before Google ever found it.

User-agent: *
Disallow: /

Block one directory instead, which is what most people actually need:

User-agent: *
Disallow: /admin/
Disallow: /cart/
Disallow: /search/

Block a single crawler while leaving the rest alone:

User-agent: Googlebot-Image
Disallow: /photos/

User-agent: AdsBot-Google
Disallow: /internal/

And allow one file inside an otherwise blocked folder, since Allow beats Disallow when the rule is more specific:

User-agent: *
Disallow: /private/
Allow: /private/public-report.pdf

Does robots.txt remove a page from Google?

No. Disallowing a URL stops the crawl, not the listing. Worse, it locks the page in place: Google can't fetch the page, so it can't see the noindex you added, so the page never drops out. This is the trap. If a URL is already indexed and you want it gone, you must leave it crawlable long enough for Google to read the removal instruction.

The correct sequence for removing an indexed page:

  • Remove any Disallow rule covering that URL. Counterintuitive, and non-negotiable.
  • Serve noindex on the page itself, either as <meta name="robots" content="noindex"> in the <head> or as an X-Robots-Tag: noindex response header (the only option for PDFs and other non-HTML files).
  • Wait for the re-crawl. Google has to fetch the page to learn it should drop it. That can take days or weeks depending on how often it visits.
  • Only then add the Disallow back, if you still want to save crawl budget once the URL is out.

We break the full decision down in robots.txt vs noindex, and you can watch the outcome with a de-indexed page detector rather than refreshing a site: search every morning.

Can I use noindex in robots.txt?

No. Google dropped support for the unofficial noindex: directive inside robots.txt in September 2019. Google supports exactly four fields: user-agent, allow, disallow, and sitemap. Anything else is silently ignored. If you copied a robots.txt from a 2017 blog post with noindex: lines in it, those lines have been doing nothing for years.

Is robots.txt enough to hide private pages?

Not remotely. Your robots.txt lives at a fixed, public URL, and anyone can read it in a browser. A line saying Disallow: /internal/customer-exports/ is a signpost pointing at the thing you're trying to hide, and plenty of scrapers read robots.txt specifically to find those paths. Compliant crawlers obey it. Nobody else has to.

For anything you genuinely can't afford to leak, authentication is the only real control. A login wall, HTTP basic auth, or an IP allowlist stops every requester, obedient or not. robots.txt is traffic management, not security.

robots.txt is a request, not a lock. It's read by well-behaved crawlers and ignored by everyone else, and it's published for the whole internet to read.

When should you actually block Googlebot?

Staging and development sites

This is the legitimate "robots txt disallow all" case, and it's also the source of the classic disaster. You block everything on staging, launch day arrives, and the staging robots.txt ships to production with the site. Traffic never arrives, nobody spots it for a month, and the file that saved you from duplicate content quietly buried the launch.

Two defenses. First, put staging behind HTTP auth instead of robots.txt, which blocks crawlers absolutely and can't leak to production as a config file. Second, make the environment boundary real: if the staging server you spin up before launch is provisioned separately from production rather than being a folder on the same box, a stray Disallow: / physically cannot ride along with the deploy.

Admin areas, carts, and internal search

Nobody should land on /wp-admin/ or /checkout/ from a search result, and crawling them wastes fetches. Internal search result pages are the strongest candidate of all: they generate infinite low-value URLs and Google has never wanted them.

Faceted and parameter URLs

Filter combinations multiply fast. Twelve filters on a product listing can produce hundreds of thousands of near-identical URLs, and Googlebot will happily crawl them all instead of your actual products. A pattern block using the supported wildcards handles it:

User-agent: *
Disallow: /*?sort=
Disallow: /*?color=
Disallow: /*&page=

Google supports * as a wildcard and $ to anchor the end of a URL. Trailing wildcards do nothing, so /fish* and /fish are the same rule. Use $ when you need an exact ending, like Disallow: /*.pdf$.

Duplicate pages

Don't block them. Duplicates want a canonical tag, not a Disallow. Blocking a duplicate stops Google reading the canonical that would have consolidated it, which leaves you with two competing URLs and no signal telling Google which one wins. This is the same trap as noindex, one layer up.

How long does it take Google to notice a robots.txt change?

Generally up to 24 hours. Google caches robots.txt for roughly a day, so a rule you add this morning may not apply until tomorrow. Two more limits worth knowing: Google honors the first 500 kibibytes of the file and ignores anything past that, and rules apply per host and protocol, so https://example.com and https://shop.example.com each need their own file.

The short version

Ask what you want before you edit anything. Stop a crawl: Disallow. Stop a listing: noindex, crawlable. Protect data: a login. Never combine Disallow and noindex on the same URL, because the first one cancels the second. And treat User-agent: * / Disallow: / as a live grenade that belongs on staging servers and nowhere else.

Our robots.txt guide covers syntax and testing in depth, and page indexing covers the other direction, getting pages in rather than out.

Indexing watches both. It monitors coverage continuously, flags URLs that are indexed despite a block or blocked despite being wanted, and explains in plain English which rule is responsible for each outcome. No claim that we can force Google to index or de-index anything, because nobody can. Just an accurate picture of what your directives are doing, before a stray Disallow costs you a quarter of traffic.

See Indexing sweep your coverage

Indexing bulk-submits your URLs through official methods, monitors coverage, diagnoses what is not indexed in plain English, and auto-resubmits. White-hat only, no spam, no guarantees that Google must index, just faster discovery.

Get every page indexed

Indexing bulk-submits your URLs through the official Google Indexing API, Bing IndexNow and sitemaps, monitors coverage, tells you in plain English why a page is not indexed, and auto-resubmits until it is found.

Official methods only · Coverage monitored in real time · Auto-resubmit

White-hat only · No spam, no PBNs, no black-hat · We speed discovery and re-crawl but Google decides what to index.