Disable Directory Browsing

Username epiz_30990805

Recently, I created one folder with a quick test page to check about the PHP capabilities whilst verifying the fitness of Hesk or Helpdeskz. To avoid security vulnerability, I named this file other than default.php or index.php

When I just typed the URL of this folder, it is showing Directory Listing of the page. I would like to request support if possible to disallow directory listing on the servers for security reasons. This is because directory listing often lists .git folders and configuration files. If these configuration files are not .php, then confidential information might get leaked.

I would humbly request support to look into the issue and assist.

You can use the Directory Privacy feature in cPanel.


You can add this to .htaccess to disable directory browsing

#Prevent Directory Browsing
Options -Indexes

It is just recommended that you add a “index.html” file. That way, you can customize what your visitors see.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.