How to Disable Directory Listing in cPanel

  WHM

A URL that leads to a directory that does not have an index file,  probably we can see a list of the files in the directory. This means indexing is turned on for that online folder. Leaving files publicly visible is a security and privacy risk.

We can disable the directory listening in Cpanel in two ways
I. Disable Directory Listing in cPanel

II. Disable Directory Listing in cPanel using cPanel File Manager

Prerequisite:

1. Cpanel credential

Implementation:

  1. Disable Directory Listing in cPanel

Step 1: Log in to cPanel. In the “Advanced” section, click the “Indexes”  icon.

Step 2: The website directory structure will be displayed. Click on the EDIT button of the public_html where we want to turn off indexing.


Note: Here we consider the document root as a public_html

Step 3: Select the No Indexing option and click the Save button.

Step 4: The success message will display as per the snapshot

  1. Disable Directory Listing in cPanel using cPanel File Manager

Step 1: In the Files section of cPanel, click the File Manager link or icon.


Step 2: Right-click the public_html in the left pane. From the drop-down menu, select Manage Indices.
Note: Here we consider the document root as a public_html


Step 3: The same Indexes page as mentioned in the previous method (Step 3) will be displayed. Select the No Indexing option and click the Save button

Step 4: The success message will display as per the snapshot

LEAVE A COMMENT