Warning: Creating default object from empty value in /home/supportsages.com/public_html/sscontent/plugins/rtbiz/vendor/redux/ReduxCore/inc/class.redux_filesystem.php on line 29
How to Disable directory listing for your website via cPanel?

Blog

How to Disable directory listing for your website via cPanel?

Published on: June 25, 2021 by Gary Griffith

How to Disable directory listing for your website via cPanel?

Scenario:

What is Directory Listing?

Directory listing is a feature which list the contents of a directory if there is no index file (e.g. index.php or index.html) present in that directory. So, once directory listing is enabled and if that directory is not having any index files, when a request is made to that directory, the web server will sends a directory listing as a response even if there are sensitive files from a web application.

What are the drawbackups of Directory Listing?

When ‘Directory listings’ is enabled it will display any content present in that specif document root path or directory. when you place a file within this directory, it means it is publicly accessible, and we need to set permissions to prevent retrieval by unwanted users.

Simply viewing the names of files and subdirectories present in your directory which is exposed very bad since hackers will eventually find your directory listings, especially if there is sensitive content or configuration. If your directories like “/admin” or “/etc” or “/var” directories is publicly accessible, your server may become compromised.

If you are intending to use Directory Listings on your server, be very careful not to place sensitive content into them and also make sure you have set permissions correctly to prevent retrieval of sensitive content that may exist.

cPanel lists all the files and directories of the website by default and you can also disable directory listing of the website by choosing No indexes and this article will guide you in that.

Step1: Login to your cPanel.

Step2: Click on the icon ‘Indexes’ under ‘ADVANCED’ section.

index

Step3: Select the directory for whose directory listing you need to disable.

Step4: From the newly opened, you can Select the ‘No Indexing’ option to disable directory listing and click save:

noindex

Note: The various options available there are:

Default System Indexing: The Default option which is set by your host.

No Indexing: Option to disable directory listing.

Standard Indexing: This option will enable the directory listing for your directory.

Fancy Indexing: This option will also enable the directory listing. The end user will see the name and description of the files and directories under your directory.

Category : cPanel

Gary Griffith

Gary Griffith

Gary Griffith is working as System Engineer at SupportSages for the last two years. He is very passionate about Linux and server management and always interested in the emerging cloud technologies. Apart from work, he is very interested in cooking and music.

You may also read:

Comments

Add new commentSIGN IN

Let's Connect

Get new updates

Categories

$0.000 items
Send this to a friend