← Back to blog
Technical SEO

6 Robots.txt Mistakes That Can Quietly Deindex Your Site

A single misplaced slash in robots.txt can quietly deindex an entire site — and because nothing visibly breaks, it can go unnoticed for weeks. Here's exactly what to check.

By Rajhussain Kanani6 min read

Why one file causes this much damage

Robots.txt sits at your domain's root (yoursite.com/robots.txt) and it's the first thing well-behaved crawlers check before touching anything else on your site. It's plain text, it's usually only a few lines long, and it's often the single easiest file on a site to edit by accident — which is exactly why it causes so many real incidents. A staging-environment robots.txt (which typically blocks everything) accidentally deployed to production is one of the most common, and most damaging, mistakes in SEO.

How robots.txt actually works

The syntax is deceptively simple, which is part of the problem — it's easy to assume you understand it fully after reading two lines:

  • User-agent: which crawler the following rules apply to (* means all crawlers).
  • Disallow: a path crawlers shouldn't request. Disallow: / blocks the entire site — this is the single most common catastrophic typo.
  • Allow: carves out an exception within a disallowed path.
  • Sitemap: points crawlers to your sitemap file directly.

What trips people up: robots.txt controls crawling, not indexing. A page blocked in robots.txt can still show up in Google's index (usually with no description, just the URL) if other sites link to it — because Google never crawled the page to see a noindex tag, it just knows the URL exists. If you actually want a page out of Google's index, robots.txt is the wrong tool; you need a noindex meta tag, which requires the page to be crawlable in the first place.

The one-line incident, before and after

This is the exact pattern behind most "my traffic dropped to zero" panics — a staging config that was never swapped out:

User-agent: *
Disallow: /

Sitemap: https://example.com/sitemap.xml

Disallow: / blocks every path on the site for every crawler, full stop — the Sitemap: line underneath doesn't help, because Google won't even request pages to see it's there. The fix is almost always this simple:

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

Sitemap: https://example.com/sitemap.xml

Everything is allowed by default now, with two specific paths carved out — an admin area and a cart flow, neither of which need to be indexed. That's the whole difference between a site that's fully blocked and one that isn't: which side of Disallow: / the rest of the file sits on.

Fetch your live robots.txt and flag dangerous rules automatically with CheckSEO's Robots.txt Checker — no signup.

Open the Robots.txt Checker

The most dangerous robots.txt mistakes

1

Disallow: / left in from staging

Blocks literally everything. This is almost always accidental — a staging config that never got swapped out before launch. Fix: check this first, every time, especially right after a site migration or replatform.

2

Blocking CSS and JS files

An older SEO habit was to block /assets/ or /js/ to "save crawl budget." Modern Google needs to render your page like a browser does to evaluate content and Core Web Vitals — blocking these files can make Google see a broken, unstyled page. Fix: never disallow CSS/JS directories unless you have a very specific reason to.

3

Confusing "disallow" with "noindex"

Covered above — disallowing a page you actually want deindexed doesn't remove it from Google's index, it just stops Google from seeing why it shouldn't be there. Fix: use noindex for removal, Disallow only for crawl management.

4

Case-sensitivity mistakes

Paths in robots.txt are case-sensitive. Disallow: /Private/ will not block /private/. Fix: match the exact casing your URLs actually use.

5

No sitemap reference

Not an error exactly, but a free win left on the table — adding your sitemap URL here is the most reliable discovery path for any crawler that checks robots.txt first (which is most of them). Fix: add Sitemap: https://yoursite.com/sitemap.xml.

6

Wrong file location

Robots.txt only works at the domain root. A file at yoursite.com/pages/robots.txt is simply ignored — crawlers only check yoursite.com/robots.txt. Fix: confirm it's actually served at the root, not nested in a subfolder by a CMS misconfiguration.

Directives worth knowing but rarely worth using

A few older directives still show up in robots.txt files and generators, worth knowing even though most sites shouldn't reach for them:

  • Crawl-delay: asks a crawler to wait a number of seconds between requests. Google has ignored it for years — crawl rate for Google specifically is set in Search Console, not robots.txt — though some other crawlers (Bing, and various SEO/scraping bots) still respect it.
  • Wildcards (* and $) — * matches any sequence of characters within a path, and $ anchors a rule to the end of a URL. Disallow: /*.pdf$ blocks every PDF on the site in one line, which is genuinely useful when a whole file type shouldn't be indexed.
  • Multiple User-agent blocks — you can target specific crawlers differently (allow Googlebot everywhere, block an aggressive scraping bot entirely) by giving each its own block with its own rules underneath.

Robots.txt versus the meta robots tag versus the X-Robots-Tag header

These three sound similar and get confused constantly, but they operate at completely different levels. Robots.txt is a site-wide crawl instruction that applies before a crawler ever requests a page — it can only say "don't fetch this URL," nothing more granular. The meta robots tag lives inside a specific HTML page's <head> and can only take effect once that page has already been crawled, which is exactly why it's the right tool for noindex and robots.txt isn't. The X-Robots-Tag is the same directive set as the meta robots tag, but sent as an HTTP response header instead of embedded in HTML — the only option for non-HTML files like PDFs or images, which have no <head> to put a meta tag in. Knowing which layer a given directive operates at prevents exactly the mistake covered above: reaching for robots.txt to solve a problem that only the meta tag or header can actually fix.

Confirming the fix actually landed

Editing the file is the easy part — knowing Google has actually picked up the change is where people stop too early. After fixing a robots.txt issue, use Search Console's URL Inspection tool on one of the previously-blocked pages: it shows the live, current robots.txt ruling for that exact URL, not a cached version. If it still shows blocked, request indexing on that URL directly rather than waiting for the next scheduled crawl — Google generally re-checks robots.txt itself within a day, but individual pages can sit in the crawl queue longer than that if you don't nudge them.

How to check yours right now

CheckSEO's Robots.txt Checker fetches your live file, flags syntax errors and dangerous rules, and shows exactly which paths are blocked — before you find out the hard way via a drop in Search Console impressions.

Frequently asked questions

How do I check if my site has a robots.txt file?

Visit yoursite.com/robots.txt directly in a browser. If it doesn't exist, crawlers assume everything is allowed — which is fine for most small sites, but means you have no crawl-control at all if you ever need it.

What does "blocked by robots.txt" mean in Search Console?

It means Googlebot found a URL (usually via a link) but was told not to crawl it. The page may still appear in search results without a description if it has external links pointing to it.

How do I fix a "blocked by robots.txt" error?

Find the matching Disallow rule for that URL's path and either remove it (if the page should be crawlable) or confirm it's intentional (if you're deliberately keeping crawlers out of that section).

Is robots.txt still necessary in 2026?

Yes — for managing crawl budget on larger sites, keeping crawlers out of admin/internal areas, and pointing crawlers to your sitemap. Small sites can function without one, but it costs nothing to have a correct one in place.

Can I block AI crawlers like GPTBot in robots.txt?

Yes — most AI crawlers (GPTBot, CCBot, Google-Extended, and others) respect a specific User-agent block the same way search crawlers do, so you can allow search indexing while opting out of AI training crawls separately.

Check your own site with the Robots.txt Checker.

Open Robots.txt Checker

More from the blog