Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've recently been tasked to code a new site. The following is the URL for the site:


As you can see going to the above URL will only lists the available files and folders in it. I want to get the server to autoload the index.html file like in www.iss.guild.uwa.edu.au/2010/

share|improve this question
up vote 2 down vote accepted

I see that your site is using apache. In the apache configuration file, add this line:

DirectoryIndex index.html

and restart apache.

share|improve this answer
Sorry if I'm being obtuse but how exactly do you do that? – jon2512chua Jan 5 '11 at 8:17
Oh and I don't exactly have full control of the server. I'm just given the storage space, I can't touch anything else. – jon2512chua Jan 5 '11 at 8:24
Upload a file called .htaccess in the root directory with that line DirectoryIndex index.html. Note that: AllowOverride must be set to yes in the apache configuration file. If it is not, then you will have to ask the client to do one of the following 1) Put the DirectoryIndex line in the apache config and restart apache himself. 2) Atleast set AllowOverride appropriately. But first, try uploading the .htaccess file to see if it works for you – JP19 Jan 5 '11 at 9:13
It also might be worth adding Options -Indexes so that it doesn't show up the directory listing – Piers Karsenbarg Jan 5 '11 at 10:39
Yup it works now thanks JP19. Oh and thanks for the tip too Piers. :) – jon2512chua Jan 5 '11 at 13:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.