If you do not have an index.htm or index.html page within a folder/directory on your site, most servers will return a list of files on the server. As an example: the image folder on my RootsWeb site. If I had created an index.html file for this folder, the viewer would receive a blank screen or a redirect if I had made it a part of the file.
If you have your sites hosted with Bluehost (affiliate link) you have a tool called the Index Manager that can handle this problem for you.
The Index Manager allows you to customize the way a directory will be viewed on the web. You can select between a default style, no indexes, or two types of indexing. If you do not wish for people to be able to see the files in your directory, choose no indexing.
- Log into your Bluehost control panel.
- Locate the Advanced menu.
- Locate and click on the “Index Manager” icon (third icon from left).
- This will bring up the Directory Selection box.
- Choose either the Web Root (public_html) or the Document Root. If you have multiple domains select the domain you want to index from the drop down box.If you do have multiple domain names please be careful not to check the “Skip this question, and always open this directory in the future when opening.”
- This will bring you to the “Index Manager Menu” that will allow you to navigate to different directories.
- You can navigate to different directories by clicking on the folder icons. Select the directory you wish to index click on the directory name and your “Index Manager” will offer you four options: a default style, no indexes, or two types of indexing. If you do not wish for people to be able to see the files in your directory, choose no indexing.
- Make your selection then click the “Save” button in the center of your screen. You will then receive a confirmation page showing the updated settings.
Now if someone clicks on a folder that does not contain an index.htm file, they will receive an error message like
You don’t have permission to access /images/ on this server.
You can also customize the page and message your viewer receives by customizing the 403.shtml file.
Very simple to do and no one will see a listing of your files again.