Why your site shows a list of files
A plain list of filenames where your homepage should be means the server has nothing to show instead — here is the fix.
Instead of your website, the browser shows a plain page headed something like "Index of /", followed by a bare list of filenames and folders. This means two things are true at once: the server has nothing it recognises as a default page to load automatically in that folder, and directory browsing — showing a listing instead — is switched on rather than blocked.
Nothing is broken in the sense of damaged files. The files listed are almost always exactly as they should be; the server simply has no instruction for which one counts as "the homepage" for that folder, and rather than refusing outright, it is showing you everything it has instead.
The causes, in the order worth checking
1. There is no recognised index file in the folder
Check the file listing itself — it's right there on screen — for a file named exactly index.php, index.html, or index.htm. If none of those exist, that alone fully explains the listing. This happens when a homepage file was never uploaded, was uploaded under a different name such as home.html, or was accidentally deleted or renamed during an edit.
Linux servers are case-sensitive. A file named Index.html or INDEX.php will not be recognised as a default page even though it looks correct at a glance — it needs to match index in lowercase precisely.
2. The files were uploaded to the wrong folder
If an index file does exist but the listing still appears, confirm it's sitting directly inside the folder your domain actually points to — usually public_html — rather than nested one level down inside an extra folder created when a zip file was extracted. A very common version of this: uploading a zipped website export creates a subfolder with the same name as the zip file, and the actual site ends up one level deeper than where the domain is looking.
3. Directory browsing is switched on
Even with no index file present, a correctly configured server would return a 403 Forbidden rather than a listing — showing the listing at all means directory browsing has been explicitly enabled somewhere, either in .htaccess or in server configuration. Add this line to the .htaccess file in the affected folder to turn it off:
Options -Indexes
This is worth doing regardless of whether you also add an index file, since it stops any future folder without one from exposing its contents the same way.
4. The DirectoryIndex directive has been changed or removed
The server decides which filename counts as the default page using a directive called DirectoryIndex. If this has been altered — removing index.php from the list, for instance, during troubleshooting for something unrelated — a perfectly normal index.php file can sit in the folder unrecognised. Adding this line to .htaccess restores the standard behaviour explicitly:
DirectoryIndex index.php index.html
5. An addon domain or subdomain is pointing at the wrong folder
If you host more than one website on a single account, each additional domain or subdomain has its own document root — the specific folder the server treats as that domain's own public_html. It is easy to point a new addon domain at the wrong folder when setting it up, or to leave it pointing at a parent folder that also contains other sites' files. The symptom looks identical to a missing index file, but the actual fix is in the domain settings section of your control panel rather than anywhere in the folder itself — check exactly which folder each domain on the account is currently mapped to.
Setting an index page without touching .htaccess directly
Most control panels offer a way to choose which page loads by default for a folder through the interface itself, which is often quicker and harder to get wrong than editing .htaccess by hand, particularly if you're not confident with the syntax involved.
Options -Indexes can be placed in a .htaccess file inside any specific folder, not just the site root, which is the right approach for folders like an uploads directory that should never show a raw file listing even though they don't need an index page of their own.
If the listing persists after adding both fixes
Confirm you edited the .htaccess file in the correct folder — a change in the site root has no effect on a subfolder that has its own separate .htaccess file overriding it further down. If it's still showing after that, support can confirm from the server side whether directory browsing is being enabled somewhere outside the files you have access to edit.
Frequently asked questions
Is a directory listing a security problem?
It can be, beyond just looking unprofessional. A visible file listing can expose file and folder names that were never meant to be public — configuration file names, backup files, or the structure of the application itself — which is genuinely useful information to someone probing a site rather than just visiting it. Turning directory browsing off entirely is worth doing even on folders that do have an index file.
I can see my files listed and they look fine. Why isn't the site loading?
Because the presence of files in the folder has no bearing on whether one of them is recognised as the default page to load automatically. The folder needs a file with a specific, recognised name — typically index.php or index.html — for the server to know what to serve when no exact file is requested.
Related reading
The server saw your request and refused it on purpose — here is how to find out which rule is doing the refusing.
How to fix a 404 Not Found errorThe server looked and found nothing there — here is how to work out whether the page moved, was deleted, or was never really at that address.
Why your browser is showing raw PHP codeYour page never rendered because the server handed out the raw source code instead of running it — here is why that happens.
How to fix "Error establishing a database connection"A blank page with one line of text, and five possible causes. Here is how to tell which one you have, in the order worth checking.