We help IT Professionals succeed at work.

Can I create DNS aliases for two different web sites on the same IIS server?

tenover asked
Running Windows 2008 Ent. R2.. Hosting two different websites, one test and one production.  Currently I have a DNS aliases on our MS DNS server that points all requests for "Test" to "http://<servername".  We will now have the full production site available on a different port, and I was wondering if it's possible to add another alias based on the port number so that employees can just type in "server/test" or "server/prod".......??  Thanks.
Watch Question

with IIS, you use BINDINGS to distinguish multiple websites hosted on the same server.

For example, you could have the following: -

Website name: test.internal
* IP -
* Binding: test.internal

Website name: production.internal
* IP -
* Binding: production.internal

Two website, one IP address.

Are you able to create a Service record (SRV record) in your DNS ?

if you use a different port, you type http://server:port1/    or   http://server:port2/

or you can use 2 folders : the normal site at the root  and the test site in a test folder ...

http://server/  => normal site
http://server/test   => test site

Finally you can use the same ip with different names : In that case you need a proxy on the server (called reverse proxy in that case)


Thanks.  I see where to set the bindings in IIS.  Currently there are two websites.  One called "test" and the other "production".  Is it as easy as just typing in a name for the bindings or does each name have to be something in particular?  Does the binding have to include the server name and/or domain name?
bindings can be anything you like.

the only caveat is that the name you use in bindings, has to exist in DNS as well.

so on your primary DNS server, you would create two A records as follows: -

Name: test
IP: {IP Address}

Name: production
IP: {IP Address}

Once set up in DNS, you can then configure your bindings and your website is good go.

BTW - you could also create 'C NAME ' DNS records which you would point to your web server.  Either option will work.


Thanks.  So in your example above, the IP address in DNS for BOTH A records would be the same IP address, correct?
That's right.