How to Avoid the “Index of” Page via cPanel?

How to Avoid the “Index of” Page via cPanel?

How to Avoid the “Index of” Page via cPanel?

When building a website, we will always keep an index file for each folder for security reasons. Otherwise, it will display an “Index of” page that lists all files and folders under that directory. If there is no index file and a visitor navigates directly to that folder, they will see a list of all files and folders under that directory. This can cause some security concerns.  In this tutorial, we are going to discuss how to avoid the “Index of” page via cPanel.

1) Log into your cPanel.

2) Go to the ‘Advanced’ section and select the ‘Indexes’ option.

Avoid Index of

 

3) Click the ‘Settings’ option from the page to select a domain.

Avoid Index of

 

4)  Click the drop-down list to select a different domain. After selecting the domain, click on ‘Save changes’ to update the changes.

Avoid Index of

 

5) This page displays the list all folders under the domain which you have selected earlier. You can select any one folder to protect by clicking the name. If you are choosing the root folder, then the setting will cascade down to all other folders, protecting them all. In our example, we have chosen the public_html folder as it is the root of our primary domain.

Avoid Index of

 

6) In this page, you can select the Indexing style. By selecting the ‘No Indexing’ radio button will prevent the index listing at all. Click ‘Save’ button to update your changes.

Avoid Index of

 

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.

If you need any further help please do reach our support department.

  • 0

How to Block Bots using Robots.txt File?

How to Block Bots using Robots.txt File? The robots.txt file is a simple text file placed on...

PageSpeed on cPanel Server

PageSpeed on cPanel Server PageSpeed on cPanel Server PageSpeed (mod_pagespeed) is a module for...

How to change cPanel logout URL

How to change cPanel logout URL Do you know that it is possible to change cPanel logout URL any...

How to Change cPanel Style

How to Change cPanel Style How to Change cPanel Style cPanel is the most popular control panel...