Skip to content

robots.txt security checker

Free, no sign-up Runs in your browser

Paste a robots.txt and find the Disallow lines that reveal sensitive paths: admin areas, backups, .git folders, staging sites and files with keys.

Paste the contents of the file at /robots.txt.

Everything you type here stays in your browser. Nothing is sent to HardenKit or to anyone else.

How to use the robots.txt security checker

  1. Open /robots.txt on your site and copy the contents.
  2. Paste the file.
  3. For each finding, open the path in a private browser window to see what an outsider gets.
  4. Protect or remove what should not be reachable, then delete the line.

About this tool

robots.txt asks search engine crawlers not to visit certain paths. It is a public file at a known address, and following it is voluntary. That makes it one of the first things an attacker or a scanner reads: a Disallow line for a path nobody links to is a signpost that the path exists and that the owner would prefer it stayed unseen.

This checker reads the Allow and Disallow lines and flags the ones that give something away: version control folders such as .git, files that look like credentials or keys, backups and database dumps, configuration and debug endpoints, admin interfaces, and staging or internal areas. Paths every site of a kind has, such as the WordPress admin folder, are left alone because listing them reveals nothing.

The fix is never a better robots.txt. A path that must stay private needs authentication or must not be on the web server at all. To keep a page out of search results without naming it, send a noindex header from the page. The findings come from name patterns, so they are prompts to check, not proof of exposure, and they do not replace a review.

Sources

Questions

Does robots.txt hide pages from attackers?

No. Anyone can read the file, and only well-behaved crawlers follow it. Scanners use it as a list of interesting paths. It does not block access to anything.

Is it safe to list my admin page in robots.txt?

It tells everyone where the admin page is, so it is only acceptable if the page is properly protected by strong authentication. To keep it out of search results without advertising it, use an X-Robots-Tag: noindex header on the page instead.

How do I keep a page out of Google without robots.txt?

Send the header X-Robots-Tag: noindex, or add a robots meta tag with noindex to the page. The crawler must be able to fetch the page to see it, so do not also disallow the path. For private content, require a login.

Why is a .git folder in robots.txt a problem?

It suggests a repository folder sits in the web root. If the server serves it, the whole source code and its history can be downloaded, often with credentials in old commits. Block or remove the folder; the Disallow line protects nothing.

Related tools