2

If I'm hosting multiple sites on a server, and a dns server resolves the different domainnames to the same address, (which is the server's name), how does IIS know eventually which site is requested?

So a client types the address of my 1. site -> myrandomsite.mydomain.com

Then another client types -> anotherrandomsite.mydomain.com

The DNS server resolves both of these to -> myserver.mydomain.com. So what happens then on the server?

Szesan
  • 82
  • 1
  • 7

1 Answers1

1

The binding host header tell IIS where request to be delivered. So when you host header mutiple domain name for the same server. You have to specify your domain name in binding->host name field.

enter image description here

When client send a request to your IIS server, http.sys receive the request first. Then it will communicate with IIS service. IIS read applicationhost.config and tell http.sys which application pool to handle the request. Finally, the request will be delivered to the correct site and application pool.

Jokies Ding
  • 3,374
  • 1
  • 5
  • 10
  • Thanks, that makes sense. I thought the DNS server modifies the host header when it finds a matching cname record. – Szesan Feb 06 '20 at 08:51