Directory Listing Detection
Directory listing allows anyone to browse the file structure of your web server, potentially exposing sensitive files and internal paths.
0% of the 101 most-visited sites we scan fail this check. See the full data.
Results in 1–3 minutes · Free · No signup required
Want the result for your own site? Free Website Vulnerability Scanner — paste your domain, get the report.
Why It Matters
When directory listing is enabled, attackers can enumerate all files in a directory, discovering backup files, configuration files, and other sensitive resources that should not be publicly accessible.
How We Check
We request common directory paths and check for 'Index of' patterns and other directory listing signatures in the response.
Good vs Bad Values
| Value | Verdict | Why |
|---|---|---|
/uploads/ returns 403 Forbidden | Good | The directory exists but has no index and listing is off. |
/uploads/ returns 404 Not Found | Good | Nothing is revealed, not even that the folder exists. |
/uploads/ serves an index.html page | Good | An index file takes precedence over any listing. |
Page titled "Index of /uploads" | Bad | Apache or Nginx autoindex output: every file name, size and date is visible. |
"Directory Listing -- /uploads/" (IIS) | Bad | IIS directory browsing is enabled for that path. |
Listing exposes .git, .env, backups (*.bak, *.sql, *.zip) or logs | Bad | Critical. Files that should never be public can be downloaded directly. |
Deliberate public download mirror (/pub/, /releases/) | Weak | Acceptable only if every file in it is meant to be public. Review it regularly. |
How to Fix
Disable directory listing in your web server configuration. Apache: add 'Options -Indexes' to .htaccess or httpd.conf. Nginx: ensure 'autoindex on' is not set. IIS: disable directory browsing in the configuration.
Apache — in the main config, not only .htaccess:
<Directory "/var/www/html">
Options -Indexes
</Directory>
Nginx — autoindex is off unless enabled, so remove any autoindex on; and add autoindex off; to be explicit:
location / {
autoindex off;
}
IIS — web.config:
<system.webServer>
<directoryBrowse enabled="false" />
</system.webServer>
Tomcat — in web.xml, set the listings init-param of the default servlet to false. Caddy only lists directories when file_server browse is used, so use plain file_server. Next.js serves files from public/ by exact path and never lists them. S3: remove public s3:ListBucket permission.
Find exposed folders yourself. Request the paths that usually hold uploads and build output. A listing is easy to recognise because the response body starts with “Index of”:
for p in uploads images assets backup files static; do
curl -s -o /dev/null -w "$p %{http_code}\n" https://example.com/$p/
done
A 200 on a folder that has no index file deserves a closer look. Open it in a browser and check whether file names are shown.
Move sensitive files out of the web root. Backups, database dumps, .env files and version-control folders should live above the document root or be denied explicitly (location ~ /\. { deny all; } in Nginx, Require all denied for dot-files in Apache). Turning listing off hides names; removing the files removes the risk.
Common Mistakes
- Disabling listing on the site root but not on sub-paths such as `/uploads/` or `/backup/`, which have their own configuration.
- Putting `Options -Indexes` in `.htaccess` when `AllowOverride` does not include `Options`. It is ignored or causes a 500 error; set it in the main config.
- Relying on listing being off while sensitive files remain in the web root. Without a listing the file is still reachable if someone guesses its name.
- Cloud storage buckets with public `ListBucket` permission, which behave like an open directory listing.
Frequently Asked Questions
What is Directory Listing Detection?
Directory listing allows anyone to browse the file structure of your web server, potentially exposing sensitive files and internal paths.
Why does Directory Listing Detection matter for website security?
When directory listing is enabled, attackers can enumerate all files in a directory, discovering backup files, configuration files, and other sensitive resources that should not be publicly accessible.
How do I fix Directory Listing Detection issues?
Disable directory listing in your web server configuration. Apache: add 'Options -Indexes' to .htaccess or httpd.conf. Nginx: ensure 'autoindex on' is not set. IIS: disable directory browsing in the configuration.
Related Security Checks
Related Tool
Website Vulnerability Scanner
Run all 7 related checks with our free website vulnerability scanner
Check Your Website Now
Run a free security scan to check for Directory Listing Detection issues and 61 other security checks.
Scan Your Website Free