HostUpon servers use the LiteSpeed web server with cPanel.
The LiteSpeed web servers default behaviour allows users visiting your website to see the contents of a directory if you haven’t defined a default index file such as an index.html or index.php.
In this, guide, we will show you how to disable directory browsing in cPanel to secure your hosting account and hide files or folders in a directory.
How To Disable Directory Listing in cPanel
Step 2: Click the Indexes icon located in the Advanced section in cPanel.
Step 3: Click on the ‘public_html‘ folder link.
Step 4: Select the ‘No Indexes‘ option and click Save.
That’s it! When someone tries to visit a directory within your website will see a 403 forbidden error message. This adds a layer of security to your website because users will no longer be able to view the structure of your website.