Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am facing a problem with a web application on IIS 7.0. Our server configuration is Win 08 server R2 and has a public IP. The problem is, when an application is web hosted on IIS 7.0 and when it is browsed it works fine, but when the same page is accessed using public IP it throws 404 page or directory not found error. And the IIS 7.0 shows default IIS page when browsed from public IP. I am not sure why there is a problem. Can anyone help me on this issue?

share|improve this question
add comment

3 Answers

Wait, what? If you're getting a 404 then you are resolving your web server (if it wasn't resolving you'd be getting nothing, especially not a 404). I think you're getting your terminology all mixed up.

There's no such thing as "DNS Manager Forwarding". Your hosting company doesn't do anything with your "A" records, your DNS hosting company does (unless they are the same thing)

To be honest, it sounds like you have hostname bindings on your IIS website, and you just need to add additional bindings for your non-www domain.

I.E. In your IIS website, under bindings, you have example.com in there, but not www.example.com

share|improve this answer
    
Ok, I have the site setup like that already. (example.com and www.example.com) My server's IP is the same as the site's IP with port 80 listed in the bindings. I have removed the website that is not being used anymore on this server, hoping it would resolve that way but I still get 404. Since it's now the only website on the server and I go in the "Bindings" and edit IP Address to All Unassigned. Do you think it will resolve then? Also, do you think because both sites were on port 80, I am getting the 404 because of that? –  notanITguru Feb 7 '13 at 13:55
add comment

If you're getting HTTP status 404 then the client is communicating with the server but the server can't find what the client requested, which tells me that your web site default document is probably not configured correctly or you don't have a host header configured for the naked domain name.

share|improve this answer
    
In the Default Document, do they need to be case-sensitive? It has "index.aspx", but the actual file is "Index.aspx". It is a production server with tons of users online right now. If I make the change will that effect the site? –  notanITguru Feb 7 '13 at 15:46
    
I don't believe it's case sensitive. After reading your question again, my assumption is that it's a host header problem and not a default document problem. If you can get to the site by www.domain.com but not by domain.com then you need to add a host header to the site for the naked domain. –  joeqwerty Feb 7 '13 at 15:49
    
I can't pull up the site with dedicated public IP. I can however, pull it up with domain name. Both "www.domain.com" and "domain.com" Just not with IP. –  notanITguru Feb 7 '13 at 15:52
add comment

Sounds like your web server is expecting a canonical www.yoursite.com server request, but has no default rule set. I'm not an IIS guy (mostly Apache and nginx), so I can't speak to how to set it up, but web servers expect a server name in the request, and can only match what you've configured. You'll need to set up a rule somehow in IIS that says "if the header request is yoursite.com (not just www.yoursite.com) then point the request to document root located at X:\path\to\website."

share|improve this answer
    
I am looking at your header suggestion now. –  notanITguru Feb 7 '13 at 14:54
add comment

Your Answer

 
discard

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.