General

How to disable Directory Listing in cPanel

Directory listing, also known as directory browsing or indexing, is a feature that allows users to view the contents of a directory on a website. While it can be useful in certain cases, it can also pose security risks by exposing sensitive information. In cPanel, you have the ability to disable directory listing to enhance the security of your website. In this article, we will guide you through the steps to disable directory listing in cPanel.

Steps to disable Directory Listing in cPanel

  1. Log in to your cPanel.
  2. Click Indexes.
  3. In Index Manager, you will see a list of directories and files in your website’s root directory. Locate the directory for which you want to disable directory listing and click Edit.
  4. Select No Indexing and click Save.

Users who directly visit your directory will now see a ‘403 Forbidden’ error.

Was this guide helpful?

Need help with this?

Open a ticket and link to this guide so our team can see what you have tried.

View support tickets

Power your business with Ecenica Hosting

Built for WordPress and serious websites. Fast, secure and supported by real people in the UK.

Ecenica hosting services represented by a connected red route across London