1) Login to your cPanel interface.
2) Click the icon ‘Indexes’ under ‘ADVANCED’ category.
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
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.