by   August 10 2015   
When you think your IIS server can't serve a page using www.domain.ext but it works with domain.ext you might have overlooked something in your DNS server or your IIS server if not both. I see this issue more than one a month posted in forums around the globe and many just can't spell out the proper process to correct the issue. I hope this post is clear enough.

It works with www but not with domain.ext why?

Why? 

If I told you the truth you would stop reading. 

So lets see how bad you need to fix this issue. 

99% of the time it's because you didn't follow the setup processes and best practices. 

Or maybe you missed that part in the documentation. 

So before you go off outsourcing your domain DNS because you think it's a DNS issue let me square you away. 

 

In your Bindings Settings you have to expressly indicate if you are going to send all wildcard calls to a single domain name. 

Example: *.domain.ext sends everything that leads with any letter or number to your domain. 

If you list for example: domain.ext the only traffic that will hit your IIS server for that domain has to come in with the domain.ext name. 

If you place a certificate in your IIS 7.0 or 7.5 server you have to make sure it covers your www.domain.ext and your domain.ext that's if you don't setup the proper redirect for your SSL pages. 

Let's say you have a simple setup like I run. 

mail.domain.ext, domain.ext redirects to www.domain.ext,  www.domain.ext and https://www.domain.ext or https://domain.ext

You would place in your bindings the following. 

From your IIS Manager (Internet Information Services Manager)
Click on your website.
To the right in the Action column find "Edit Site" below that you'll see Bindings.

In Bindings > you will see "Type" , "Hostname", "Port", "IP Address", "Binding Information".

Your first site might look like this:

http, domain.ext, 80, 10.0.0.1, Information.

Add another form of your main domain and you might get something like this:

http, www.domain.ext, 80, 10.0.0.1, Information.


Add your SSL to the mix and you should have something like this: 

https, domain.ext, 443, 10.0.0.1, Information.

https, domain.ext, 443, 10.0.0.1, Information.

 

If you have a subdomain on a different IP that would be a new binding and that might look like this: 

http, sub.domain.ext, 80, 10.0.1.1, Information.

 

 Just remember, DNS servers will need to specify in most cases that you want all sent to your domain. 

My DNS servers look like this. 

*.domain.ext for all my wildcard results. 

www.domain.ext for all my users that use www. before the domain. 

domain.ext for all those that don't use the www. 
My .Net Config.Web page will redirect the domain.ext people to the www.domain.ext . 

So you have to really tell the IIS server what you have in your DNS server. 

If you get a 404 page not found for your domain.ext but you find the page with www.domain.ext you have overlooked adding the www. or the *. to either if not both your DNS and IIS server. 

I can post pictures but really, if it's in your DNS and it's for ports 80 or 443 it also should be in your IIS server even if it's only a redirect to another site. 

Murray W.

When you think your IIS server can't serve a page using www.domain.ext but it works with domain.ext you might have overlooked something in your DNS server or your IIS server if not both. I see this issue more than one a month posted in forums around the globe and many just can't spell out the proper process to correct the issue. I hope this post is clear enough.