← All Articles
SEO

How to Fix robots.txt Disallow That Blocks Google From Your Site

A single Disallow: / line can keep Googlebot off every page you care about. Here is how to find the blocking rule, fix it without breaking intentional blocks, and confirm Google can crawl again.

The NetTooling Team8 min read

If Search Console shows “Blocked by robots.txt,” indexed pages are falling, or a URL inspection says Googlebot cannot fetch your homepage, the first place to look is robots.txt. That plain text file at the root of your site is a set of instructions for crawlers. When it is wrong, Google does not “push through” out of goodwill. It respects a clear Disallow and simply stays out.

The most common disaster is a site-wide block that was meant to be temporary: Disallow: / under User-agent: *. Staging copies get published with that rule still in place. CMS plugins rewrite the file during a deploy. A CDN serves an old robots.txt from cache. None of those feel dramatic until traffic quietly disappears.

What Disallow actually does

robots.txt uses Allow and Disallow paths relative to the site root. Disallow: / tells matching crawlers not to fetch any URL path. Disallow: /admin/ only blocks paths under /admin/. Matching is prefix-based, so Disallow: /private blocks /private, /private/, and /private-notes.html unless a more specific Allow overrides it for some parsers. Google’s crawler follows the standard carefully; other bots may be looser or ignore the file entirely.

Important nuance: robots.txt controls crawling, not indexing. If Google already knows a URL from links, it might still list it without a snippet. Blocking crawl does not erase a URL from existence. The fix for discovery and fresh content is still the same: stop blocking the paths you want crawled, then request indexing where needed.

How to confirm Google is blocked

  1. Open https://yourdomain.com/robots.txt in a browser and read the live file, not a local copy.
  2. Look for User-agent: * or User-agent: Googlebot paired with Disallow: / or broad Disallow rules covering your content paths.
  3. In Google Search Console, use URL Inspection on the homepage and a key inner page; note any “Blocked by robots.txt” result.
  4. Check the robots.txt report in Search Console for blocked sitemap submissions or known blocked URLs.
  5. Validate the file with a robots.txt checker so syntax mistakes and conflicting rules are easier to see.

The fixes that usually solve it

If the whole site is blocked, replace Disallow: / with either no Disallow lines for that user-agent, or only the paths you truly want private. An empty Disallow (Disallow: with nothing after it) means “allow everything” for that group. Prefer an explicit allow-all pattern your team understands: either omit Disallow entirely, or keep targeted rules for /wp-admin/, /cart/, API internals, and similar.

If only Googlebot is blocked while other agents are allowed, that is often a leftover from aggressive bot management. Align Googlebot with your * rules unless you have a deliberate reason to treat it differently. If a plugin or security product regenerates robots.txt on every deploy, fix the source template, not just the live file, or the block will return overnight.

Treat robots.txt like production config: review it in staging, diff it in deploys, and never leave Disallow: / on a public hostname.

After you change the file

Purge CDN or reverse-proxy cache for /robots.txt so Googlebot does not keep reading the old version. Submit or re-submit your sitemap once the file allows it. Use URL Inspection to request indexing on the homepage and a few money pages. Crawl recovery is not instant; budget days, not minutes, especially on larger sites. Meanwhile, keep watching the robots.txt and coverage reports so a bad deploy does not reintroduce the block.

Also separate intentional privacy from accidental hiding. Login areas, checkout flows, and thin parameter URLs are fine to disallow. Your blog, product pages, and docs usually are not. If you need a page out of Google’s index, use noindex on the page itself rather than blocking crawl when you still want Google to see the directive. Blocking crawl can prevent Google from reading a noindex tag on that URL.

A short checklist before you close the ticket

Confirm the live robots.txt no longer contains a site-wide Disallow for Googlebot or *. Confirm sitemaps are referenced and fetchable. Confirm Search Console URL Inspection can fetch key URLs. Confirm staging hosts, if any, still block crawlers on purpose so you do not index duplicate environments. That last point is where many teams create the original Disallow: / habit: they copy staging rules into production and forget to switch them back.

Frequently Asked Questions

Does Disallow: / hide my site from Google completely?

It tells Googlebot not to crawl paths on that host. Google may still show known URLs with limited or missing snippets. To recover, remove the blocking rule, ensure important pages are linked or in a sitemap, and use Search Console to monitor crawl and indexing.

Should I use robots.txt or noindex to keep a page out of results?

Use noindex when you want Google to see the page and keep it out of the index. Use robots.txt Disallow when you want to reduce crawl on private or useless URL spaces. If you disallow crawl, Google may not see a noindex tag on that URL.

Why did Search Console still show blocked after I fixed robots.txt?

Caches and recrawl delay. Purge CDN cache for /robots.txt, wait for Googlebot to refetch, then re-test with URL Inspection. Large sites can take days before coverage reports fully catch up.

Is Allow required if I remove Disallow: /?

No. If there is no Disallow for a user-agent group, crawling is allowed by default. Add Allow only when you need to carve exceptions out of a broader Disallow rule.

Try the Tools

Put this into practice with our free, no-signup tools.