Configure additional bindings in IIS 7.5 so websites answer to different names
One of the main purposes of the “Bindings” setting for a website’s properties is so the webserver knows which website to serve out when a request comes across on port 80. ย After all if a server is literally serving out 50 websites on port 80, it has to have a way to know which site a user is trying to get to. ย The Bindings of a website provide the ability to provide theย host nameย that a particular website is bound to.
A critical piece to the puzzle of correctly working bindings is DNS. ย After all, hosts use DNS in most of today’s modern day networks to resolve IP names to host names and reverse DNS to resolve host names to IP addresses. ย If DNS is not setup correctly with the correct records for hosts that you are trying to resolve for bindings purposes, the website lookups will fail and the IIS server will not be passed the correct information to serve out the correct website. ย Usually this is done with CNAME or alias records that point multiple different hostnames to the same web server. ย The webserver then takes the requests that are passed through to it via the CNAME record and correlates this with the binding of a particular website. ย So, the web server can run potentially as many websites as it has the physical resources to run, all on the same port, i.e. 80.
To view the bindings of a website, open yourย Internet Information Services (IIS) Manager and right click on the website you want to view the bindings for. ย Then selectย Edit Bindings:
This takes you to theย Site Bindingsย dialog box
Click theย Add…ย button to add bindings to your website. ย For instance, if we wanted to add the binding forย mywebsite.mydomain.combย we can easily do this:
Keep in mind as we mentioned in the outset, DNS has to properly pass any configuredย Host name:ย that you add via the dialog above to the web server for the bindings to actually work. ย If this is simply anย intranetย website that we are adding bindings for, we can easily control that via internal DNS entries. ย However, things can become more complicated from the outside since DNS records as well as any configured domain names must be correctly configured and passed along accordingly.