Learn how to Disable Directory Listing in cPanel | disable directory listing wordpress | disable directory listing htaccess | disable directory listing apache | disable directory listing linux | disable directory listing ubuntu. Most web servers allow any user to browse the directories (folders) when no index file is available. This can lead to information leakage and help an attacker when trying to compromise your site. In order to improve your security, you should disable this option. The NIST Guide for Securing Web Servers also recommends it.
Simply add the following line anywhere in your .htaccess file:
Options -Indexes
Also read