cPanel has powerful capabilities to help you disable directory listing for your files of a website.
Other articles on the web may call it directory browsing, it is one and the same thing.
Steps to disable directory listing.
Option 1: Disable Directory Listing in cPanel Using Indexes.
- Log into cPanel.
- In the ADVANCED SECTION, click on Indexes.
- Click the directory whose index settings needs to be changed.
- Select No Indexing to disable directory listing.
There are four options to select from.
Default System Indexing: It is set by the hosting service provider. This is the default option.
No Indexing: Use this option to disable directory listing.
Standard Indexing: Enables directory listing. Website visitors can see the name of the directories on your website.
Fancy Indexing: This option will enable the directory listing. Website visitors can see the name and description of the files and directories under your indexed directory.
- Click on Save button to finish
Option 2: Disable Directory Listing in cPanel Using File Manager (File Permissions).
- You must start by logging into your cPanel.
- Click on File Manager under FILES section in your cPanel.
- Most times File Manager will open in a new tab. Right click on the directory/folder that should be made private.
- From the pop-up menu, click on Change Permissions.
- Edit permissions to read 771 and click on Change Permission.
- Click on Change Permissions.
Option 3: Using File Manager (Manage Indices).
- I assume that you are already logged into your cPanel and opened File Manager as shown in Method 2 above.
- Right click on the directory/folder that should be made private.
- Click on Manage Indices. This will open Indexes interface in a new tab.
- Click on No Indexing option and click on Save.
- Protect your website’s files from unauthorized access.
- Reduces chances of your files being attacked by hackers.
- Puts you in control of the files you want to share with the rest of the world.
- Can help hide duplicate content from your website thus boosting your SEO score.
All web hosting accounts hosted at Shujaa Host are managed via cPanel thus this feature is offered out of the box. If you have trouble enforcing this settings, contact our support today.
PS: If you haven’t tried our web hosting services, consider checking out our hosting packages.
Read more about computer directories here.