WHM - Plesk - CWP

Disable Directory Listing in Cpanel

If you view all files when you enter a directory on your site that does not have an index page, your directory viewing settings are open.

For the security of your site, you should disable Directory listing.

How to Disable Directory Listing in Cpanel

  • Log in to Cpanel.
  • Go to Indexes under Advanced section.
  • Edit the folder you want to block index viewing.
  • Check the “No Indexing” option and save.

After making this setting, when you want to view the directory you will receive an “403 Forbidden Access to this resource on the server is denied!” warning and your files will not be visible.

Indexes

Inherit – Select this mode to use the parent directory’s setting. If the index settings are not defined in the parent directory, the system will use its default settings.

No Indexing – No files will appear for this directory if a default file is missing.

Show Filename Only –  This mode shows a simple list of the files present if the default file is missing.

how Filename and Description – This mode shows a list of files and their attributes: file size and file type.

When you change the PHP version of your site, your indexing settings will also change.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top