How to Disable Directory Listing in cPanel

Last modified: August 1, 2020
You are here:
Estimated reading time: 1 min

You can customize the directory settings of a website. By default, cPanel lists all the files and directories of the website. You can also disable directory listing of the website by choosing No indexes.

 

Method1

1) Login to your cPanel interface.

2) Click the icon ‘Indexes’ under ‘ADVANCED’ category.

Disable Directory Listing

 

3) Select the directory for which you want to change the index settings.

4) A new window will open and here you can click ‘No Indexing’ option to disable directory listing.

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 in order 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.

5) Click Save.

 

Method 2

1) Login to your cPanel interface.

2) Click ‘File manager’ icon from the ‘FILES’ category.

Disable Directory Listing

 

3) Select the folder for which you want to disable directory listing.

4) Right click the folder and click ‘Change Permissions’ option to set the permission of that folder.

Disable Directory Listing

 

5) Assign permission as “771”. This means that the folder can’t be accessible by users or visitors it can only be accessible to the owners and it’s groups.

Disable Directory Listing

 

6) Click ‘Change Permissions’ to save the changes.

Disable Directory Listing

 

Method 3

1) Login to your cPanel interface.

2) Click ‘File manager’ icon from the ‘FILES’ category.

Disable Directory Listing

 

3) Select and right click the folder which you want to disable directory listing.

4) Click ‘Manage Indices’ option.

Disable Directory Listing

 

5) Click the option ‘No Indexing’

6) Click ‘Save’.

 

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

Was this article helpful?
Dislike 0
Views: 23