Skip to main content

Local & AI SEO

What if your robots.txt blocks Google

A single line in a text file can remove an entire site from search. It happens most often when a staging configuration goes live, and because nothing visibly breaks, it can run for weeks before anyone notices the traffic has gone.

Last reviewed by James Henderson

How do you fix a robots.txt blocking your site?

Open yourdomain.com/robots.txt and look for Disallow: / — one slash blocks everything. Correct the file, confirm pages report as crawlable in Search Console's URL inspection, resubmit the sitemap, and add a post-deployment check so a staging configuration cannot go live again.

Frequently asked questions

What line blocks an entire site?

User-agent: * followed by Disallow: / — a single slash. It is the default on many staging environments and it goes live with alarming regularity.

Does blocking a page remove it from search results?

No. robots.txt controls crawling, not indexing. A blocked URL can still appear, usually without a description, if other sites link to it. Use a noindex tag to remove a page.

Can I use robots.txt and noindex together?

Not on the same page. If the page is disallowed the crawler never reads the noindex, so the page stays in the index. It is a common and confusing mistake.

What should a small business robots.txt contain?

Very little — block admin paths, allow everything else, and point at the sitemap with an absolute URL. Every extra line copied from an article is a chance to block something important.

How do I prevent this recurring?

Make robots.txt part of environment configuration rather than a copied file, add a post-deployment check that fails on a blanket disallow, verify manually after any migration, and alert on sharp impression drops.

Want this looked at for your business?

Twenty minutes on the phone usually finds the one thing holding the number back. James answers himself.

You reach James, not a call centre. No answer means he is on a job — leave a message and he calls back.

Call James: 832-338-2926

BayouEdge AI Assistant

Ask about our services

Hi! I'm the BayouEdge AI assistant. I can help you learn about our marketing services for Houston and South Texas businesses. What can I help you with?

Powered by BayouEdge AI