How to Stop Directory Listing with Index Manager

This article will show you how to stop your files being listed publicly using the Index Manager in cPanel.
1. Understand the Problem
If a visitor opens a folder that has no index page, the server lists every file and folder inside it. Anyone who finds that folder can browse your uploads, backups and configuration files.
2. Open Index Manager
Find it in the Advanced section of cPanel.
3. Navigate to the Folder
Work through the directory tree to the folder you want to protect. Uploads and includes folders are the usual candidates.
4. Choose No Indexing
Select No Indexing to stop the contents being listed. Default System Setting hands the decision back to the server configuration.
5. Save and Test
Save, then visit the folder in a browser. You should get a 403 rather than a file list.
6. Consider an Index File Instead
Placing an empty index.html in the folder achieves the same thing and travels with your files if you move host.
Next: How to Set Up Password Protection Using .htaccess covers restricting access entirely.