How to Disable directory browsing for the website on cPanel server/WHM ?

Disable directory browsing on cPanel server/WHM.

  1. Bhawani Singh
    We use directory listing option to list all the pages under the website directory or folder. If you don’t remember the exact file name then you can use the directly listing option to make your work easily. For example : like your domain name is and you put all the pages and files under the website directly then you have to enter , to list all the files under this directly. It makes your work easy, but many service providers disable the directly listing, we have to find out why?

    Why directory listing disable for WHM/cPanel server ?

    If you enable the directory listing for your website then it is possible that hackers can use this and hack your website. So it is best option to hide your directly listing that nobody can see the full list of your directory. If you enable the directly listing of your website then it can be one of the major security issue. In this article we will discuss about disabling the browser listing on our server.

    How to disable directory listing for your WHM/cPanel server ?

    To make your website safe and secure it is the best option to disable directly listing for whole server. There are also options available to disable directory listing through cPanel but if you want to denied access listing for whole server then it is must to do it from WHM panel and follow the further steps :

    1. Login to WHM.

    2. On the left side panel click “Service Configuration”.

    3. Now choose “Apache Configuration” option under Service Configuration.


    4. Select “Global Configuration” option.


    5. Click on “Directory ‘/’ Options”.

    6. Now uncheck the “Indexes” option to disable listing.


    7. Click on Save button.

    8. If you want to enable it again then check the indexes option for it.