Can’t view website with public IP, but www.example.com & example.com work fine

domain-name-systemhttp-status-code-404iis-7ipwindows-server-2008

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?

Best Answer

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