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 (e.g. index.html or index.php).

Leaking such kind of information to the world is very dangerous because malicious users are given a better clue of your website structure or the building blocks of your web application.

So, we will disable it from our site to prevent it. In this guide, we’ll show you how to disable directory listing from cPanel and make the website more secure.

  • Login to cPanel
  • Locate Index manager from the dashboard by searching “Indexes”


  • In the next page, you will see cPanel Indexes manager and top level directories.



    You need to click on edit button that you want to customize. So, we want to protect directories under the root of your website, select the ‘public_html’ folder for customization.
  • In the next page, you will see 4 options to choose –

    – Default System settings
    – No Indexing
    – Standard Indexing
    – Fancy Indexing


  • To completely switch off directory listing on your account, choose ‘No Indexing’ as shown on the image below:



    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.