Sensitive paths named in robots.txt

How the scan reads the Disallow lines in robots.txt for admin, backup, config and similar paths, and why listing them in a public file is a warning.

What AuditX checks

The scan reads the robots.txt file that it already fetched for the whole scan, so this check sends no extra request. If there is no robots.txt, or it is empty, the check passes. Otherwise it goes through every Disallow line in every user-agent group; Allow lines are ignored. A path counts as sensitive when one of its folder names, compared as a whole word and ignoring capitals, is on a fixed list: admin, administrator, administration, wp-admin, cpanel, phpmyadmin, adminpanel, controlpanel, backend, backup, backups, config, configs, configuration, .env, staging, stage, sandbox, uat, db, database, databases, sql, internal, intranet, private, .git, .svn and .hg. So /blog/ never matches, and /admin/ and /site/backup/ do. Rules that contain a * or a ? are skipped, a closing $ is ignored, and a bare / is skipped. Three standard entries are also skipped because the platform itself makes them public knowledge: a path that ends in /wp-admin, /config when the file opens with the Squarespace comment, and /admin when the file has a numbered Shopify checkout rule. Three addresses are the first thing anyone tries, so naming them gives little away: /admin, /administrator and /index.php/admin. When only those are left, the check is an info note that does not change a score. The check warns when at least one other sensitive path is left; the message lists those, each once. Otherwise it passes. It is never a fail. The scan does not request the paths, so it does not know whether they exist or can be opened. A security score is lowered by a warn.

Why it matters

Google Search Central states that robots.txt is not a way to keep a page out of search results or to protect it. It only asks well-behaved crawlers to skip a path, and anyone can read the file.

OWASP Web Security Testing Guide lists robots.txt as a file to review for leaked information, because Disallow lines can name the very folders an owner wants to keep quiet.

How to fix it

  1. Open your robots.txt (yourdomain.com/robots.txt) and note each path the report names.
  2. Remove those Disallow lines. Protect the areas with a login, an IP allowlist or a block in the server settings instead, so a request is refused whether or not a crawler obeys.
  3. To keep a page out of search results, serve a noindex robots meta tag or an X-Robots-Tag header on it, and leave the page crawlable so Google can see that instruction.
  4. Delete old backups, config files and staging copies from the public web folder, so there is nothing left to find.
User-agent: *
Disallow: /cart/
Disallow: /search

Does your site pass this check? A free scan runs it with every other check and shows the result in about a minute.

Scan my site

Sources

Related checks

Last reviewed 2026-11-13.