Directory Browsing : If there is no index file to display on your website, it will show the directories and other files. This is not secur...
Directory Browsing :
If there is no index file to display on your website, it will show the directories and other files. This is not secure to display all the files and folders on the website. For security purposes, we will disable the Directory Browsing.
Directory listing is a web server function that displays the directory contents when there is no index file in a specific website directory. It is dangerous to leave this function turned on for the web server because it leads to information disclosure.
For example, when a user requests www.icchablog.com without specifying a file (such as index.html, index.php, or default.asp), the web server processes this request, and returns the index file for that directory, and the browser displays the website. However, if the index file did not exist and if the directory listing was turned on, the web server would return the contents of the directory instead.
If you’ve ever visited a site and seen a list of files and folders instead of a webpage, then you’ve seen directory browsing in action.
How to Check if Directory Browsing is Enabled:
The easiest way to check whether directory browsing is currently enabled for your WordPress website is by simply visiting the /wp-includes/ folder link like this: https://www.icchablog.com/wp-includes/
You’ll want to replace www.icchablog.com with your website’s URL. If you get a 403 Forbidden or similar message, then directory browsing is already disabled on your WordPress website.
Disable directory browsing with cPanel easy:
In this article, we will show you how you can disable directory browsing in WordPress.
- Login to your cPanel.
- Click on the Indexes under the ‘ ADVANCED’ category.
- Click the Edit button to select the directory for which you want to Disable the Directory browsing .
- Click on No Indexing and hit the Save Button.
A new window will open and here
Here you can see four types of indexing methods.
Default System Indexing: This is the default option set by a hosting provider.
No Indexing: This option allows to disable directory listing. The main reason to disable directory listing is to enable privacy in order to reduce the chances of the files being attacked.
Standard Indexing: This option will enable the directory listing. The user can see the name of the directories
Fancy Indexing: This option will enable the directory listing. The user can see the name and description of the files and directories under your indexed directory.
- Click ‘No Indexing’ option to disable directory browsing.
- Click Save.
When directory browsing is disabled on your website it shows 403 Forbidden or a similar message.
COMMENTS