Multiple Server Names on Windows 5


Having multiple server names on Windows server or client is nice feature you may want to have when you are migrating applications, using servers as part of web server farms, etc.
As opposed to the Linux hostname where names can be arbitrarily changed, names for a machine in the Windows world have multiple dependencies and if you look at the computer name dialog box you only see one single text box.
You may think that adding aliases (CNAME) in the DNS would suffice to have your server targeted using any name you wish.
However, since the appearance of Strict Name Checking , it is far from being enough. You must add several registry keys to your server so it knows it must accept to answer under different names.

Adding alternate DNS name to a server

For this to happen, you must:

  • add a REG_MULTI_SZ under: HKLM\System\CurrentControlSet\Services\DNSCache\Parameters\AlternateComputerNames
  • one FQDN per line
  • do not add the current name of the server
  • run ipconfig /registerdns for the modifications to take place

The following script will do that for you in an easy way:

Adding alternate NetBIOS name to a server

  • add a REG_MULTI_SZ under: HKLM\System\CurrentControlSet\Services\LanManServer\Parameters\OptionalNames
  • one netbios name without backslashes per line
  • do not add the current name of the server
  • restart the server service for the modifications to take place

These steps can be done using the following script:

Built-in command netdom

Please note that on the latest versions of Windows, you can use netdom

The ‘myserver’ is the main short name. Every alternate name should be entered using a FQDN; THe command will create the above mentioned registry keys in both locations, add the DNS record and even the Kerberos Service Principal Name (SPN) if enough rights are given.

Additional remark

If the changes are not working please do following :

  1. Locate the following key in the registry: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters
  2. add the following registry value: DisableStrictNameChecking as REG_DWORD, its value should be 1

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

5 thoughts on “Multiple Server Names on Windows