prsona
Get started
High: fix this week

Robots.txt blocking Google: the one line that hides a whole site

Last reviewed

One line in robots.txt can hide your whole site from Google.

Robots.txt is a small text file at the root of your site that tells search engine crawlers which pages they may visit. If it contains "Disallow: /" under a rule that applies to all crawlers, it blocks the whole site. Google stops reading your pages, rankings fade, and nothing on the site looks wrong to you or your visitors.

Why a robots.txt file that blocks Google costs you customers

Organic search is often the cheapest source of leads a business has, and a blocked site slowly drops out of it. Pages stop being refreshed, descriptions disappear from results, and new pages never get indexed. Because the site works perfectly for visitors, the first sign is usually a traffic report weeks later.

What usually causes a robots.txt file that blocks Google

  • A staging or development site was launched with its "block search engines" setting still on
  • A CMS option that discourages search engines was ticked by mistake
  • A developer blocked crawlers during a redesign and never removed the rule
  • A rule meant for one folder was written too broadly
  • A new robots.txt replaced the old one during a migration

How to check for a robots.txt file that blocks Google yourself

  1. Type your domain followed by /robots.txt into a browser. Look for a line reading "Disallow: /" directly under "User-agent: *".
  2. Search Google for "site:" plus your domain. Few or no results, or results saying no information is available for the page, suggest crawling is blocked.
  3. In Google Search Console, open the robots.txt report and the URL inspection tool to see whether Google says a page is blocked by robots.txt.
  4. In WordPress, open Settings, then Reading, and make sure "Discourage search engines from indexing this site" is not ticked.

How to fix a robots.txt file that blocks Google

  1. Have your developer remove the site-wide "Disallow: /" line, or replace it with rules that block only the private folders you intend to hide.
  2. Untick any CMS setting that discourages search engines, then reload /robots.txt in a browser to confirm the file changed.
  3. Add a line pointing to your sitemap in the file, so crawlers can find every page once they are allowed back in.
  4. Request indexing of your key pages in Google Search Console to speed up the recrawl. Recovery still takes time, so fix it as early as possible.
  5. Add a robots.txt check to your launch checklist, since most cases start on the day a new site goes live.

How Prsona catches a robots.txt file that blocks Google

Prsona reads your robots.txt on every scan and flags a rule that blocks the whole site for all crawlers. The finding names the issue and when it was first seen, so a leftover staging rule gets caught on the next scan instead of in a traffic report weeks later.

Prsona looks for a robots.txt file that blocks Google as part of technical SEO monitoring.

Check whether your robots.txt is telling search engines to skip your entire site.

Questions about a robots.txt file that blocks Google

What does "Disallow: /" mean in robots.txt?

It tells the crawlers named above it not to visit any address on the site. The single slash stands for everything from the root down. Under "User-agent: *" it applies to all well-behaved crawlers, including Google. By contrast, "Disallow:" with nothing after it blocks nothing at all, so one character changes the meaning completely.

Can a page still appear in Google if robots.txt blocks it?

Yes, sometimes. Robots.txt stops crawling, not indexing. If other sites link to a blocked page, Google may still list the bare address without a description, because it was never allowed to read the content. To keep a page out of results entirely, allow crawling and use a "noindex" tag instead.

Sources