Using DNS Aliases on Windows Machines.

I regularly get asked about people adding CNAMEs to DNS to set up an alias for a Windows machine. Like maybe the machine name is server123site5 and they want to call it oldserver1. They do that and all of a sudden when they try to use it the connection attempt results in a “duplicate name exists on the network” error.

Not going to spend the time explaining why this happens other than it is a name validation in the SMB 1.0 handshake but the solution is to use either the DisableStrictNameChecking or OptionalNames registry keys under HKLM\Services\LanmanServer\Parameters.