Logo

Find Exposed Files on Your Website

Something on your server is public that should not be. You will not know until someone else finds it first. These queries check your own domain for the twelve exposures we see most, and each one comes with the fix rather than just the bad news.

Queries are built in your browser and never sent to us. We do not fetch your site, scan it, or store the domain you type. Clicking a query opens Google directly from your browser.

Enter a domain and tick the box to enable the run buttons. You can read every query and its fix without doing either.

Directory listings left switched on

High

Folders your web server renders as a browsable file list because no index page exists.

site:yourdomain.com intitle:"index of"

Configuration and environment files

High

Config files served as plain text, which often carry database credentials and API keys.

site:yourdomain.com ext:env | ext:ini | ext:conf | ext:cfg

Database dumps and backups

High

Exports and backup copies left in a public folder, usually after a migration.

site:yourdomain.com ext:sql | ext:dump | ext:bak | ext:old

Version control directories

High

A repository folder deployed alongside the site, which can expose full source history.

site:yourdomain.com inurl:.git | inurl:.svn

Backup archives in the web root

Medium

Compressed archives, frequently a whole-site backup someone left behind.

site:yourdomain.com ext:zip | ext:tar | ext:gz | ext:rar

Log files reachable over HTTP

Medium

Application or error logs served as text, often containing paths, usernames and session identifiers.

site:yourdomain.com ext:log | ext:txt inurl:log

Error output and stack traces

Medium

Pages that rendered a raw error, exposing file paths, framework versions and query structure.

site:yourdomain.com intext:"Fatal error" | intext:"Warning: include" | intext:"SQL syntax"

Diagnostic and info pages

Medium

Diagnostic pages that list your full environment, module versions and absolute paths.

site:yourdomain.com inurl:phpinfo | intitle:"phpinfo()"

Login and admin pages in the index

Low

Authentication pages Google has indexed and can therefore show to anyone searching.

site:yourdomain.com inurl:login | inurl:admin | inurl:signin | inurl:dashboard

Spreadsheets and documents

Medium

Office files Google indexed, including ones linked only from a page nobody expected to be crawled.

site:yourdomain.com filetype:xlsx | filetype:docx | filetype:csv

Staging and development hosts

Medium

Indexed content on hosts other than your main site, which often surfaces staging and test environments.

site:yourdomain.com -inurl:www

Old pages still in the index

Low

Content Google dates to before your cutoff, including pages you believed were removed.

site:yourdomain.com before:2021-01-01

Why google dorking for defenders beats waiting for a report

The same queries attackers use work just as well pointed at your own domain. Nothing about the technique is offensive. It is a search skill, and defenders have the advantage of knowing what should be there.

Most exposure we see is accidental and recent. Someone copies a database backup into the web root during a migration. A config file rides along in a release. A debugging page gets created at 2am and never deleted. None of that shows up in a vulnerability scanner, because nothing is vulnerable — the files are simply public.

Search engines index them because something linked to them, or because a directory listing made them discoverable. Once indexed, they are findable by anyone who knows the right query.

The honest caveat: this checks what Google already crawled. A file nobody ever linked to can sit there for years, fully reachable, and never appear in any of these results. A clean sweep is encouraging. It is not proof.

How to check if my site leaks data without scanning it

You do not need to scan anything. Every query above runs against Google's index, not against your server, so there is no traffic to your infrastructure and nothing to whitelist.

That matters more than it sounds. Scanning tools generate load, trip your own alerting, and on shared hosting can breach the provider's terms. A search query does none of that.

Work down by severity. Configuration files, database dumps and repository folders first — those three hand over credentials directly. Archives, logs and error output next. Indexed login pages and stale content last, because they are rarely urgent.

Read the false positive note on each check before you escalate. Documentation pages quoting error text, sample config templates and deliberately published reports all trip these queries. We have watched teams spend an afternoon on a "breach" that was a press kit.

If you are auditing a domain on someone else's behalf, confirm who actually controls it first. A WHOIS lookup to confirm domain ownership takes ten seconds and occasionally changes the answer.

What a directory listing exposed to search engines really reveals

A directory listing is your web server rendering a folder as a clickable file index. It happens when a folder has no index page and automatic indexing is switched on.

The listing itself leaks little. What it does is make everything in that folder discoverable and crawlable, including files nothing links to. One indexed listing can pull an entire backup directory into the search index behind it.

Turning it off takes one line of server config. What takes longer is working out why the folder was reachable in the first place, which is usually the more useful question.

What to do when you find exposed env files

Rotate first. Delete second. That order is deliberate and people routinely get it backwards.

An environment file that was publicly readable has to be treated as read. You cannot establish who fetched it — access logs rarely reach far enough back, and automated collectors sweep for these paths continuously. Every database password, API key and signing secret in that file needs replacing.

Then move it out of the web root entirely. Blocking the path in server config works until someone changes that config. A file that lives above the document root cannot be served by accident.

The queries behind these checks come from the same operator families used in offensive research. If you want to understand what each family surfaces, the breakdown of what each operator category exposes covers it, and the operator reference explains the syntax itself.

Removing it from search is not the same as fixing it

Getting a result out of Google feels like resolution. It usually is not. The file stays reachable to anyone with the URL, and URLs circulate.

Two traps catch people here. Robots.txt does not de-index anything — it asks crawlers not to fetch, which can freeze an existing listing in place rather than removing it. And a page blocked in robots.txt can never be de-indexed by a noindex tag, because the crawler cannot fetch the page to read the tag.

The working sequence is: fix the exposure, let the URL return 404 or 410, then use a removal request only to buy time. Full detail sits in the guide to fixing what this audit finds.

Making it routine to find exposed files on your website

Quarterly is enough for a stable site. After every migration or significant deploy is better, because that is when exposure appears.

Keep the queries somewhere your team can rerun them without thinking. The full dork generator handles the broader set if you want to build checks specific to your stack.

Fifteen minutes a quarter is a reasonable trade against finding out from someone else. Nothing you enter here leaves your browser, so you can run it against production without a conversation about third-party data handling.

Frequently Asked Questions

I deleted the file, so why is it still showing in Google?

+
Deletion and de-indexing are separate events. Google keeps the entry until it recrawls the URL and receives a 404 or 410, which can take days or weeks on a low-traffic path. Returning 410 rather than 404 signals a permanent removal and usually clears it faster.

Does adding the path to robots.txt take it out of search results?

+
No, and this is the mistake we correct most often. Robots.txt asks crawlers not to fetch a page. It says nothing about indexing, so a blocked URL can stay listed indefinitely, sometimes with no description. Blocking a page that is already indexed can actually lock the listing in place.

Then why does blocking a page stop noindex from working?

+
Because the crawler has to fetch the page to read the noindex tag. Block it in robots.txt and Google never sees the instruction. The correct order is to allow the crawl, serve noindex, wait for it to drop out, and only then block the path if you still want to.

How long does the URL removal tool actually hold?

+
Search Console removals are temporary — roughly six months — and they hide the result rather than deleting anything. Treat one as breathing room while you fix the underlying cause. If the file is still reachable when the removal lapses, the listing returns.

I found an exposed .env file. Is deleting it enough?

+
No. Assume every secret in that file is compromised and rotate all of them — database passwords, API keys, signing secrets. You cannot know who fetched it while it was public, and server logs rarely go back far enough to tell you.

Should I list sensitive folders in robots.txt so crawlers skip them?

+
Please do not. Robots.txt is public at a predictable path, so naming your admin and backup directories in it produces a tidy map of exactly what you consider sensitive. Protect those paths with authentication and leave them out of the file entirely.

Will these queries find everything that is exposed?

+
They will not, and it matters that you know that. These queries only search what Google has already indexed. A file nobody has ever linked to may be perfectly reachable and completely absent from these results. Treat a clean sweep as encouraging, never as proof.

Our staging site turned up in the results. What is the right fix?

+
Put it behind authentication. A noindex tag keeps it out of search but leaves it readable to anyone who learns the hostname, and hostnames leak through certificate transparency logs whether you publish them or not. Passwords are the control here; obscurity is not.

Is an indexed login page a security problem?

+
By itself, no. Attackers find login pages regardless, so hiding one buys very little. Spend the effort on rate limiting, lockouts and multi-factor authentication instead. Add noindex if it bothers you, but do not count it as remediation.

How often is it worth running this?

+
Quarterly for a stable site, and after every migration or major deploy. Migrations are where exposure appears — someone copies a backup into the web root, or a config file rides along in a release. In our experience most findings trace back to a change made within the previous month.

Related Tools You Might Like

Advertisement