Browse topics Knowledgebase navigation

Knowledgebase article

What to do if your website shows a directory listing

This guide explains what it means if your website shows a directory listing and what you can do to fix it.

A directory listing usually appears when a browser opens a folder on your website instead of loading a normal page. Instead of seeing your homepage, you may see a plain list of files and folders. This can look confusing, but it often points to a simple issue with the website files or account setup.

In many cases, this happens because there is no default index page in the folder being opened, or because the website is loading from the wrong location.

In this article, we will cover

  • What a directory listing is
  • Why it may appear on your website
  • What to check in your website files
  • When to contact support

What is a directory listing?

A directory listing is a page that shows the contents of a folder on your hosting account. Instead of loading a normal webpage, the server displays a list of files such as images, documents, or subfolders.

You may recognise it because the page often looks very plain and may show file names, modified dates, or folder links. In some cases, it may display wording such as Index of followed by the folder name.

[Screenshot Placeholder – browser showing Index of directory listing page]

Why does this happen?

The most common reason is that the folder being opened does not contain a default homepage file. On many hosting accounts, this would usually be a file such as index.html or index.php.

If that file is missing, named incorrectly, or uploaded to the wrong folder, the server may show the folder contents instead of your website.

This can also happen if the domain is pointing to the wrong website directory, if website files have not been uploaded yet, or if an existing index file was deleted during an update or migration.

Check your website files

Log in to cPanel and open File Manager to review the files in your website directory. For many websites, this will be the public_html folder or a domain-specific document root.

Look for a homepage file such as index.html or index.php. If there is no index file in that folder, the website may not know which page to load first.

If the file exists, make sure it is in the correct location and that the website domain is loading from that same folder.

[Screenshot Placeholder – cPanel File Manager showing website files and index file]

Check for recent changes

If the directory listing has only just started appearing, think about whether anything changed recently. For example, you may have uploaded new website files, moved the site to a different folder, changed the domain configuration, or restored a backup.

Even a small change can affect which folder the domain loads from or whether the correct index file is present.

When to contact support

If you can see your files but are not sure which folder the domain should use, or if the correct index file is already present and the problem continues, it may be time to contact support.

When contacting support, it helps to include the domain name and explain whether the issue started after a recent change.

Need help?

If your website is showing a directory listing and you would like us to investigate, our support team will be happy to assist.

Open a support ticket

Was this answer helpful?

Keep Reading

Still stuck?

Couldn’t find what you are looking for?

If this article did not solve the issue, send us the details and we will help you directly.

Open a support ticket

Powered by WHMCompleteSolution