The Index Manager can stop people from seeing a list of all your files in a folder (the "Index of/" page that appears when you do not have an index.html file.)
If a directory on a site does not contain an index file, it will by default simply list every file in that directory in the visitor's browser. This is not always desirable, and the Index Manager allow you to turn this feature off.
How to Use the Index Manager
- Go to cPanel and click Index Manager.
- Select Web Root or the domain name or subdomain you want to view. Click Go once selected. (Selecting Web Root will allow you to see all the publicly visible folders on your account.)
- Click on a folder icon to look inside. Click on a folder name to change it.
- To disable directory indexing, change the setting to "No Indexing".
To enable directory indexing, change the setting to anything except "No Indexing".
Note: If you have previously manually edited your .htaccess file using tutorials such as HostGator's Directory Index tutorial, the cPanel editor will not recognize your code and will append its code to the end of yours. This could result in invalid .htaccess code and an Internal Server Error. Example:
- If you have added a Directory Index line to your .htaccess file like this:
- Following these steps may cause cPanel to produce this code:
DirectoryIndex index.phpOptions -Indexes
This may be resolved by moving the cPanel code to a new line, like this: