Serving 2 different websites from the same IIS server on the same port

br flag

I have 2 different websites:


I want to be able to serve both of these websites from the same webserver (same IP) and same port number.

I have followed this document, and created the following websites:

enter image description here

This is how the binding for looks like:

enter image description here

And this is how the binding for looks like:

enter image description here

Note that the only way I could define 2 sites using the same IP and Port was to use a Host name for one of them.

With the above settings, works but does not work. If I stop from IIS, then starts working.

The document that I used as a guide explains that I need to use dnsmgmt.msc to define a CNAME for, but here is where I am confused. I am using AWS and I have defined 2 CNAME records for these websites in Route 53. Do I still need to define a CNAME record for one of these websites in Windows?

If not, then how would I tell IIS that request containing should be sent to website having the host name =


The answer provided by Greg suggests that I would add as Host name as well. If I follow this solution, how would I handle requests for

At the moment, any request for is permanently redirected to

br flag

Add to the binding for that site to match the similar configuration for

My guess is that the one is matching the request condition for (just port 80).

br flag
Thanks for your answer. Do you know how should I handle ``? I have updated the question.
br flag
You don’t have a configuration on your server, based on your screenshots. Do you want both and to be the same site? If so, you can just add a second binding for that has as a host name.
I sit in a Tesla and translated this thread with Ai:


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.