Support article
Index of /: what it means and how to fix it
Find out why Index of / appears on your website, how to fix it and how to stop the server from showing a file listing.
Introduction
If your website shows a message such as Index of /, it usually means the server could not find a main page to display and is listing the files inside the folder instead.
This often happens after an incomplete upload, an installation in the wrong folder or the accidental removal of the startup file.
This guide explains what it means, how to fix it and how to prevent your files from being exposed.
What “Index of /” means
The web server looks for a startup file to load the page. The most common names are:
index.htmlindex.phpindex.htm
If the server cannot find any of those files in the main folder of the domain, it may show the contents of the directory like a file browser. That listing is the Index of / message.
Why it appears
The most common causes are:
- The website has not been uploaded yet.
- The files were uploaded to the wrong folder.
- The main file has another name, such as
home.htmlinstead ofindex.html. - The WordPress, PrestaShop or other CMS installation was not completed.
- The
index.phporindex.htmlfile was removed or has incorrect permissions. - Directory listing is allowed in the site configuration.
How to fix it
1. Review the correct domain folder
Access the file manager from DirectAdmin, cPanel or through FTP.
Depending on the panel and the domain configuration, the main folder is usually one of these:
- In DirectAdmin:
/domains/yourdomain.com/public_html/ - In cPanel:
/public_html/ - For addon domains: an assigned subfolder inside
public_html
Make sure the website files are inside the correct folder.
2. Confirm that an index file exists
Inside the main folder there must be a file named exactly:
index.php
or
index.html
Be careful with uppercase letters, spaces or incorrect extensions. For example, Index.html, index.html.txt or home.html may not work as the main file.
3. Move the files if they were uploaded into a subfolder
It is common to upload a website inside a folder such as:
/public_html/mywebsite/
In that case, the server may not find the startup file when visiting the main domain.
The solution is to move the contents of that subfolder directly into public_html, unless you really want the website to load from a path like yourdomain.com/mywebsite/.
4. If you use WordPress, review the installation
In a correct WordPress installation, the main folder should contain files such as:
index.php
wp-config.php
wp-content/
wp-admin/
wp-includes/
If you only see one folder or incomplete files, the installation may not have finished or it may have been uploaded to the wrong location.
5. Disable file listing
If your website is not ready yet, you can upload a temporary index.html file with an “Under construction” message.
You can also stop the server from listing files by using the .htaccess file.
Add this line:
Options -Indexes
Save the change and reload the page.
Conclusion
The Index of / message appears when the server cannot find a home page and shows a file listing instead. Review the correct folder, confirm that an index file exists and disable directory listing if you do not want your files to be visible.
If you are unsure where the website should be placed, contact support and provide the affected domain.