GICT knowledge base
How to Avoid the “Index of” Page via cPanel?
Published
How to Avoid the “Index of” Page via cPanel?
When building a website, we will always keep an index file for each folder for security reasons. Otherwise, it will display an “Index of” page that lists all files and folders under that directory. If there is no index file and a visitor navigates directly to that folder, they will see a list of all files and folders under that directory. This can cause some security concerns. In this tutorial, we are going to discuss how to avoid the “Index of” page via cPanel.
1) Log into your cPanel.
2) Go to the ‘Advanced’ section and select the ‘Indexes’ option.
3) Click the ‘Settings’ option from the page to select a domain.
4) Click the drop-down list to select a different domain. After selecting the domain, click on ‘Save changes’ to update the changes.
5) This page displays the list all folders under the domain which you have selected earlier. You can select any one folder to protect by clicking the name. If you are choosing the root folder, then the setting will cascade down to all other folders, protecting them all. In our example, we have chosen the public_html folder as it is the root of our primary domain.
6) In this page, you can select the Indexing style. By selecting the ‘No Indexing’ radio button will prevent the index listing at all. Click ‘Save’ button to update your changes.
Now you can visit your site and enter a subdirectory without an index file. You should receive a 403 Forbidden page instead of a list of files.
If you need any further help please do reach our support department.
Related guides
Host Additional Domains on an Eligible InterServer Account
Check your hosting limits, choose a separate site or alias and use cPanel or DirectAdmin with deliberate DNS, content and certificate verification.
cPanelHardening Your cPanel Server: Beyond the Basics After CVE-2026-41940
Security is a moving target. With the recent discovery of CVE-2026-41940, it has become clear that just having a firewall isn't enough anymore.
cPanelcPanel and Plesk notice: Awstats,. Webalizer and Analog stats are being removed
Important Update: cPanel and Plesk Phasing Out Legacy Statistics Tools If you regularly check your website traffic through your hosting control panel, we have an...
cPanelThe dangers of shared licenses (in other words unofficial/cracked licenses)
Why Cracked cPanel Licenses Aren’t Worth the Risk: A Guide for InterServer Customers When you’re managing a server, every dollar counts.





