All Collections
Website Troubleshooting
What to Do When a Website Shows "Index of /"
What to Do When a Website Shows "Index of /"

Alternatives to fix the "Index of /" error on a website

Updated over a week ago

To access any website, typically only the domain name is used, e.g. by entering domain.tld on the browser's address bar, and the index file loads by default.

If there is no index.php or index.html in the root folder (/public_html) for the domain, an "Index of /" message will appear, similar to this:

The Index of / page due to a missing or misnamed index file

To fix it, the best solution is building a website. If you already have a website or you want to simply hide this message, check the following options:

Option 1 - Disable Directory Listing

If you don’t want the content of the root folder to be displayed on your website, go to WebsitesManage and search for Folder Index Manager on the left sidebar:

The Folder Index Manager menu option

On the directory field, enter the public_html folder. On indexing type, choose No index and click Add:

The Setup Indexing Type section in the Folder Index Manager

Option 2 - Check the Index File

Go to the public_html folder of your domain via File Manager and check that the index file name is written correctly. It can be either index.html, index.htm, or index.php. If none of these files exist, you can create an empty index file:

The New file window of Hostinger hPanel's File Manager
Did this answer your question?