Adding IIS Host Headers in DNS using Netdom utliity


An age old question for IIS administrators is how to effectively manage small, medium, or even large Web servers with a minimal set of IP addresses.  The network team often manages layer 3 which includes the IP addresses that are available for Web servers.  If an unlimited supply of IP addresses existed, there would be no need for host headers.

IIS provides a mechanism that supports the creation of multiple Websites (often referred to as virtual servers) using a single IP address through the use of Host Headers.  Host headers are supported in HTTP version 1.1 and more is included in the following Microsoft Knowledge Base article http://technet.microsoft.com/en-us/library/cc753195(WS.10).aspx which isn’t the purpose of my post. 

Instead, the often difficult aspects of the use of host headers in the enterprise is for a Web admin (or any admin that is the non-AD\DNS administrator) to get the host header created.  I was recently in this dilemma and I was completely taken aback when I learned about functionality included in the netdom.exe utility.

Creating Alternate Identities for a Computer using Netdom

By default, any domain-joined Web server already has a single FQDN relative to the actual computer name.  This is created in the DNS server using a A record utilizing dynamic registration.  However, the problem begins when one needs the ability to have an alternate name for the server that doesn’t match the computer name hence creating an alternative DNS A record.

Little did I know that this is possible using a utility on the Server (Windows Server 2008/Windows Server 2008 R2)

image

Using Netdom /Add to Configure Alternate Identity (Host Headers)

To add the alternate name for the computer name, do the following:

NOTE:  In the following command, the IIS Web Server name is IIsWebServer name and the IIS Host Header desired is hr.contoso.com

  1. Open an Elevated Command-Prompt (e.g. Administrator)
  2. Type Netdom /? to see the syntax available or netdom /add /? to see more
  3. To add the alternate name, type the following:
Netdom computername IIsWebServer /Add:hr.contoso.com

After using this command, reboot the server for the change to successfully complete.

Summary

Amazingly, this is extremely easy and completely successful.  If there are others out there that were aware of this then shame on me but I couldn’t believe I missed this.  Nonetheless, I hope someone else out there finds this as helpful as I did!

-Chris

Comments (0)

Skip to main content