I have followed all the steps in this posting to setup the IIS. But when I got to the http://domainname/ by itself, it does not load the 'Default Document'. I get:

The page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. Please try the following:

HTTP 404 - File not found Internet Information Services

However, if I put the full name, it seems to load just fine (ex: http://domainname/Default.htm)

I have verified that the Default.htm file is added in the 'Documents' tab under the 'Default Web Site Properties' and the 'Enable Default Document' is checked.

The default location is set to: C:\Inetpub\wwwroot

The contents of Default.htm:

  <title>Test Page</title>
 <a href="http://pep.si/cZwVJi">Cure for Giant Auxonal Neuropathy</a>

Here is the log, but I'm not sure what to make of it:

Software: Microsoft Internet Information Services 5.1
Version: 1.0
Date: 2010-08-26 12:10:59
Fields: time c-ip cs-method cs-uri-stem sc-status
12:10:59 X.X.X.X GET / 404
12:11:19 X.X.X.X GET / 404
12:14:11 X.X.X.X GET / 404
12:15:10 X.X.X.X GET / 404
13:50:36 Y.Y.Y.Y GET / 404
13:50:45 Y.Y.Y.Y GET /Default.htm 200
13:50:58 Y.Y.Y.Y GET / 404

where X.X.X.X is the local IP and Y.Y.Y.Y is IP to the world

Is there anything else that I could be missing?

Update: Looks like I can get it to work if the 'Home Directory' is set to something other than C:\Inetpub\wwwroot. I changed it to C:\Inetpub\wwwroot\Test and moved the files there, then went to http://domainname and it worked. Does anyone know why the default path doesn't work?

  • Check for typos, restart the service, check the text of Default.htm and the actual location of that file. – Grizly Aug 26 '10 at 1:09
  • @Grizly - Thanks for the comment, I've updated the post with the addition details. Does anything seem wrong? – SwDevMan81 Aug 26 '10 at 2:20

The server knows that it should serve the default document when the browser request comes in to the server name or the ip address. It doesn't know that it should serve the default document when the browser request comes in to any other names, whether those names resolve to the ip address or not.

When you specify the URL and the document you're specifically telling the server to retrieve a specific file from whatever web site is running on the ip address that domainname resolves to. It's like retrieving a file from the file system by specifying the absolute path to that file. You could put any file there and retrieve it regardless of whether it's in the documents list or not just by specifying the filename (the absolute path).

You need to add a host header to the web site for domainname so that it knows it should respond to requests for http://domainname.

Of course I could be completely wrong. I don't work with IIS that much.

  • Thanks for the answer. I just tried adding the actual domain name to the 'Host Header Name' in the 'Advanced Multiple Web Site Configuration', but that did seem to help. I was really hoping this would work. Do you have any other ideas? +1 for the answer – SwDevMan81 Aug 26 '10 at 11:50
  • Hmm... I thought for sure that was it. Sorry, I'm out of ideas then. – joeqwerty Aug 26 '10 at 13:39
  • Thanks for trying. I've added the log. I'm kind of new to this, so I'm not sure what the errors might be – SwDevMan81 Aug 26 '10 at 14:07
  • Ok, I got it to work by changing the default directory. Any idea why the default one might not work? – SwDevMan81 Aug 26 '10 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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