Apache’s web server 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 information in 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.

 

With cPanel, you can customize the directory settings of a website. Since by default, cPanel lists all the files and directories of the website. Let go in and check how to disable directory listing for your website via cPanel.

 

Procedure:


1. Login to your cPanel.


 

2. Click on the icon ‘Indexes’ under the ‘ADVANCED’ section.

 

3. Select the directory for which you want to change the index settings. A new window opens, and here you can choose the ‘No Indexing’ option to disable directory listing.

 

Here you can see four types of indexing methods.

  • Default System Indexing: This is the default option set by a hosting provider.
  • No Indexing: This option allows to disable directory listing. The main reason to disable directory listing is to enable privacy to reduce the chances of the files being attacked.
  • Standard Indexing: This option will enable the directory listing. The user can see the name of the directories.
  • Fancy Indexing: This option will enable the directory listing. The user can see the name and description of the files and directories under your indexed directory.

 

4. Click Save.

 

If you need any further assistance please contact our support department.

Was this answer helpful? 0 Users Found This Useful (0 Votes)