I'm running a Windows 2008 R2 box with IIS 7.5 as the web server.

On IIS, I have two websites: mysubsite1.mysite.com and mysubsite2.mysite.com. There is only one IP on the server and both sites share this IP. Here is how I have the bindings configured:



mysubsite1.mysite.com works fine. However, mysubsite2.mysite.com gives me the following error:

Not Found

HTTP Error 404. The requested resource is not found.

Now, if I change the Host name field for mysubsite1.mysite.com to blank and restart the web server, both sites work!


The question is why is the host name field for the first site causing an HTTP 404 error for the second site when both sites' Host name fields are filled?

I would appreciate any insight. Thank you.

  • Can you verify that you don't have a typo your DNS records anywhere?
    – MDMarra
    Nov 29, 2012 at 11:43

2 Answers 2


Instead of leaving the address to "All Unassigned", set it to the shared IP address for both sites.


My first thought is that it's a port-error. You seem to try to connect to two different sites on the same port and that just doesn't work. Your first site, mysubsite1 uses the default http-port 80 and works fine. However, when you try to access mysubsite2 on port 80 you get an error simply because mysubsite2 doesn't exist on that port.

What you need to do is to create a virtual host on a different port (8081 and upwards are often used).

  • Thank you very much. If it's a port error, as you say, then why would taking off the host name for mysubsite1 fix the problem? And I thought the bindings look at IP, port, and hostname to determine the appropriate response and to where the request is mapped.
    – user717236
    Nov 28, 2012 at 22:34
  • 1
    Without knowing too much about IIS I would say that taking of mysubsite1 would "free" up port 80. The bindings does exactly as you say, the problem is you have told it to "find mysubsite2 on port 80". But there is no mysubsite1 on port 80 and that gives you an error.
    – Sandokan
    Nov 28, 2012 at 22:49
  • Thank you. Well, both sites operate fine when the first site has no host name bound. If I bind the host name for both sites, then the second site breaks. If I understand your explanation correctly, the second site should break, no matter what, because it also exists on port 80. But that's not what's happening here.
    – user717236
    Nov 28, 2012 at 22:54
  • 3
    @Sandokan -1 This should work just find as long as you have host headers configured (think of them like Apache Named Virtualhosts). If you don't know much about IIS, you should think twice about answering IIS questions :)
    – MDMarra
    Nov 28, 2012 at 22:58
  • So that means that my answer is completely wrong and thus should be downgraded?
    – Sandokan
    Nov 28, 2012 at 23:04

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.