All Collections
cPanel
Website
How to Disable Directory Listing in cPanel
How to Disable Directory Listing in cPanel

If you see Index of / message it means there is no index file uploaded on your account.

Updated over a week ago

You can easily disable directory listing by logging in to your cPanel and navigating to the Indexes:

The indexes option in cPanel

Once there, locate the public_html folder, select click on Edit next to it and choose No indexing on the next page. Next, save the changes:

The indexing options on cPanel

You can also upload an empty index.html or index.php file if you don’t want the content to be displayed on your website (while still disabling the list of directories). Alternatively, you can add a few lines of code to your .htaccess file defining which file should be meant for the first page of your website:

#Alternate default index page
DirectoryIndex newpage.html

Replacing newpage.html with your index file name.

The best way to resolve empty page issues is to build a website! You can check this comprehensive tutorial to start right away: How to Make a Website 💡

Did this answer your question?