How to Disable Directory Listing in cPanel

September 5, 2023 / cPanel

In this article, we will explain two different methods for disabling directory listing in cPanel.

Check out the First Method:

  1. Log into your “cPanel Account.”
    Login to cPanel
  2. Search for the ‘Advanced’ option, and click on the ‘Indexes’ sub-option.
  3. Select the “Directory”, and click on “EDIT.”
    Current Directory
  4. A new window will appear, that will allow you to select the ‘No Indexing’ option to disable the directory listing. You will see four types of indexing methods.
    1. Inhert: This option is configured as the default by the hosting provider.
    2. No Indexing: This option allows you to disable directory listing. The primary purpose behind disabling directory listing is to enhance privacy and reduce the vulnerability of files to potential attacks.
    3. Show Filename Only: Selecting this option will activate the directory listing, allowing users to view the names of the directories.
    4. Show Filename and Description: Enabling this option will activate directory listing, allowing users to view both the names and descriptions of the files and directories within your indexed directory.No Index
  5. Click on “Save.”

Let’s check the second Method:

  1. Log into your “cPanel Account.”
  2. Click ‘File Manager’ from the ‘Files’ Tools.
    File Manager
  3. Select any directory, right-click, and click “Manage Indices.”
  4. Select “No Indexing” option and click on “Save.”
    No Index

In these 2 different ways, you can disable any directory listing in cPanel. If you require any additional assistance, please don’t hesitate to reach out to our support department.

Spread the love