Preventing the "Index Of" listing page using the Index Manager
Proper structure is important when building a website. Including an index page in each folder is one of the basic steps to both desing and security. By default, if a visitor lands on a subdirectory without an index page, they will see an "Index Of" page that lists all files and folders under that directory. This can be at the least embarassing and unprofessional and at most a security risk. Follow the instructions below to learn how to stop the "Index Of" page from showing using the Index Manager in the cPanel.
How to prevent displaying the "Index Of" page via cPanel
- First, log into your cPanel interface.
- Look through the categories listing on the right hand panel of the main cpanel page and find Advanced category. Click on the Index Manager icon to continue.
- Next, a popup will appear. You will select the domain name you want to work with. Click the Go button to continue once you have selected your domain.
- Next is a page that lists all folders under the domain you previously selected. You can select any one folder to protect by clicking the name. If you select the root folder, the setting will cascade down to all other folders, protecting them all. In our example, we will select the public_html folder as it is the root for our primary domain and we want to protect all folders in the domain.
- You are now brought to a screen where you can select the Indexing style you want to present. To prevent any index listing at all, simply select the No Indexing radio button. Click Save to activate your selection. Now you can visit your site and enter a subdirectory without an index file. You should receive a 403 Forbidden page instead of a list of files. Below is a before and after shot demonstrating how the No Index setting prevents the display of the file list.
Support Center Login
Social Media Login
2014-04-16 12:32 am
hello...,good morning.inmotionhosting is a flexible tutorial for cpanel and webhosting.
2015-09-14 11:34 am
I had the same problem and followed the steps above in this example and got the 403 forbiden page.
So what next becaause i need to see my website online insteadof the 403 page.
2015-09-14 1:59 pm
If you are now seeing the 403 it means that there is no index page for your site in that folder. You will need to upload one.
2015-11-10 9:51 pm
Can we also put an index.php file in the directory redirecting back to the main index page of the site? Or, would this not be advisable?
2015-11-11 12:53 am
That does work as well just requires different steps is all.