So you’ve just browsed to your Web site and instead of the usual pages – all you see is a list of files and directories.
What you are seeing is the default behaviour of an apache Web server. Where there are no files named index.html or index.php in the root folder – a directory listing will be offered instead.
Now if you’ve only just setup the server or account this is fairly standard and shouldn’t worry you as you will start creating your site and the list will vanish as soon as an index.(html|php) is created or uploaded.
If you are expecting to see an existing site however, and instead you see the directory listing – something has gone wrong somewhere.
There are many possible causes for this:-
- The file may have been infected via a php injection attack and removed by a malware scanner.
- The site may have been attacked.
- Your account password may not be very secure.
- File system corruption.
- User inadvertently deleted file.
Again these are just a few of the many possible causes – not a definitive list.
The first step to resolving the issue would be to check if you have a backup of the file – if you do - upload it and the site should restore and display as it once did.
If you have a Content Management System (CMS) like WordPress or Joomla – you could download a new version of the base site files and just upload the missing file(s) to your server. As soon as you replace the missing files the site will load again as it once did.