Contents

Preventing the “Index Of” listing page using the Index Manager

05 Feb 2018 0 95  0
Preventing the "Index Of" listing page using the Index Manager
Preventing the “Index Of” listing page using the Index Manager

 

If you are building a website, it is important that you have a proper structure; this includes an index page in every folder which is a basic step in both design and security.

By default, when a visitor lands on a sub directory without an index page, they will be shown an “Index of” page which will display all of the files and folders below the directory. This can prove to be embarrassing, unprofessional, and even a security risk.

By following the steps of this tutorial, you will learn how to prevent the “Index of” listing page by using the index manager in cPanel.

How to prevent displaying the “Index Of” page via cPanel

Step 1: Begin by entering your cPanel interface.

Step 2: Look through the categories listing on the right hand panel of the main cPanel page for the ‘Advanced’ category. After this, click on the ‘indexes’ icon to proceed.

Step 3: To be able to choose a domain, first click on ‘Settings’ before using the drop-down arrow to choose the desired domain. After you chose your domain, click on ‘Save changes’.

Step 4: Now, go to a page that lists every folder under the domain you previously chose. You can choose any folder that you would like to protect by simply clicking on the name.

If you choose the root folder, the settings will cascade down to every other folder, protecting all of them in turn.

In this example we will be choosing the ‘public_html’ folder since it is the root for our primary domain and we would like to protect every folder in that domain.

Step 5: You should now be brought to a screen where you may choose the Indexing style you’d like to present. To stop any index listing at all, choose the “No indexing” radio button before clicking on ‘save’ to activate your selection.

You can now visit your site and enter a sub directory without an index file. The site should be showing a 403 Forbidden page instead of the list of files.

0 Comments
Add a comment

Leave a Reply