1. Home
  2. cPanel Tutorials
  3. How to disable Directory Browsing in cPanel
  1. Home
  2. Help & Troubleshooting
  3. How to disable Directory Browsing in cPanel

How to disable Directory Browsing in cPanel

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 1:  Login to your cPanel control panel

Step 2:  Click the Indexes icon located in the Advanced section in cPanel.

Hide Index

Step 3:  Click on the ‘public_html‘ folder link.

Indexes 2

Step 4:  Select the ‘No Indexes‘ option and click Save.

Indexes 3

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.


Updated on November 30, 2019

Was this article helpful?

Related Articles