How to disable Directory Browsing in cPanel

HostUpon servers use the LiteSpeed web server with cPanel.

The LiteSpeed web servers default behaviour allows users visiting your website to see the contents of a directory if you haven’t defined a default index file such as an index.html or index.php.

In this, guide, we will show you how to disable directory browsing in cPanel to secure your hosting account and hide files or folders in a directory.

How To Disable Directory Listing in cPanel

Step 1:  Login to your cPanel control panel

Step 2:  Click the Indexes icon located in the Advanced section in cPanel.

Hide Index

Step 3:  Click on the ‘public_html‘ folder link.

Indexes 2

Step 4:  Select the ‘No Indexes‘ option and click Save.

Indexes 3

That’s it!  When someone tries to visit a directory within your website will see a 403 forbidden error message. This adds a layer of security to your website because users will no longer be able to view the structure of your website.

  • cpanel, cpanel down, cpanel hosting, cpanel account migration
  • 0 Utilisateurs l'ont trouvée utile
Cette réponse était-elle pertinente?

Articles connexes

How can I migrate my cPanels to OBHost Website Hosting?

Two separate methods exist for server-to-server migrations.  Both are managed by us to ensure...

Enabling or Disabling PHP Modules

We provide the facility to enable/disable PHP modules / libraries per account.To enable a...

How can I test or preview my website before switching DNS?

There are a few different ways to preview your site before DNS resolves. This will allow you to...

SSH Access

For security purposes, we lock down SSH access to our platform by IP address.  If you wish to...

How do I add another domain to my Hosting Account?

To add a new domain to your existing hosting account: 1. Log into your cPanel control panel2....