Windows OS Hub
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux

 Windows OS Hub / Windows 11 / Adding Multiple Alternate DNS Names for a Windows Computer

September 3, 2024

Adding Multiple Alternate DNS Names for a Windows Computer

In migrating scenarios, it is often necessary to be able to access Windows servers (computers) using both the old and new hostnames. The simplest way to make a computer accessible by a new name is to add an alias (CNAME) to the DNS pointing to the old FQDN name (A record).


A CNAME alias for the old hostname can be added using the DNS Manager console (dnsmgmt.msc) or by the Add-DnsServerResourceRecordCName command:

Add-DnsServerResourceRecordCName -ZoneName woshub.loc -Name new-wks11 -HostNameAlias wks11.woshub.loc

Add a CNAME (alias) for computer on Windows DNS

However, if you’ve created a DNS alias, you won’t be able to perform Kerberos authentication when accessing the computer using the new hostname. This is because when you add a DNS record to a computer, the SPN (Service Principal Name) value in the AD object properties is not updated.

Windows Server has a built-in netdom.exe command that can be used to correctly add an additional hostname. For example, if you want to add a second hostname to the fs01 computer, run the following command with an alternate FQDN:

netdom computername fs01 /ADD new-fs01.woshub.loc

Register the new name in the DNS:

ipconfig /registerdns

The netdom command will register a CNAME record in DNS, add the new name to the AlternateComputerNames registry parameter (described below), and update the value of the servicePrincipalName and msDS-AdditionalDnsHostName attributes for the computer account in AD.

List all registered computer names:

netdom computername m-dc01 /enum

netdom computername command: add second computer name (Alias)

Get registered SPNs for a computer account:

setspn.exe -L fs01

The netdom.exe command is missing in Windows 10 and 11, so you’ll need to change the registry to add an additional hostname manually.

To add an alternate DNS name:

  1. Under the HKLM\System\CurrentControlSet\Services\DNSCache\Parameters\ registry key, create a REG_Multi_SZ parameter called AlternateComputerNames.AlternateComputerNames - adding alternate DNS name to a Windows host
  2. Specify an additional FQDN name (or multiple names) for this (one FQDN per line)
  3. Register computer names in DNS: ipconfig /registerdns
  4. Add the new computer name to the SPN:
    SETSPN -a host/new-wks11 wks11
    SETSPN -a host/new-wks11_name.woshub.loc wks11

To add an alternative NetBIOS name to a computer, create the OptionalNames parameter (REG_Multi_SZ) in the HKLM\System\CurrentControlSet\Services\LanManServer\Parameters reg key.

OptionalNames registry item: add alternate NetBIOS name

Then restart the lanmanserver service:

net stop lanmanserver
net start lanmanserver

If for some reason you cannot update the computer’s SPN in AD, create a REG_DWORD parameter called DisableStrictNameChecking (HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters) and set to 1. This will allow the shared SMB folders on that computer to be accessed under the new name.

0 comment
7
Facebook Twitter Google + Pinterest
Windows 11Windows Server 2022
previous post
How to Hide or Show the ‘Safely Remove Hardware’ Icon on Windows
next post
Get Started with Docker on Windows (WSL2) without Docker Desktop

Related Reading

Create a Custom Windows Image with Pre-installed Apps

February 28, 2024

Upgrading to Windows 11 on Unsupported Hardware

March 6, 2024

How to Assign (Passthrough) a Physical GPU to...

June 11, 2024

Installing Language Pack in Windows 10/11 with PowerShell

September 20, 2023

Configuring RemoteApps Hosted on Windows 10/11 (without Windows...

January 25, 2025

How to Create UEFI Bootable USB Drive to...

March 13, 2024

Disable BitLocker Automatic Drive Encryption in Windows 11

October 16, 2024

Fix: Your IT Administrator Has Limited Access to...

March 22, 2024

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Encrypt Any Client-Server App Traffic on Windows with Stunnel

    June 12, 2025
  • Failed to Open the Group Policy Object on a Computer

    June 2, 2025
  • Remote Desktop Printing with RD Easy Print Redirection

    June 2, 2025
  • Disable the Lock Screen Widgets in Windows 11

    May 26, 2025
  • Configuring Windows Protected Print Mode (WPP)

    May 19, 2025
  • Map a Network Drive over SSH (SSHFS) in Windows

    May 13, 2025
  • Configure NTP Time Source for Active Directory Domain

    May 6, 2025
  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Allow Multiple RDP Sessions on Windows 10 and 11
  • How to Run Program without Admin Privileges and Bypass UAC Prompt
  • Fixing ‘The Network Path Was Not Found’ 0x80070035 Error Code on Windows
  • How to Delete Old User Profiles in Windows
  • How to Install Remote Server Administration Tools (RSAT) on Windows
  • How to Backup and Copy Local Group Policy Settings to Another Computer
  • How to Fix ‘An Operating System Wasn’t Found’ Error on Windows
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top