{"id":9914,"date":"2024-09-03T13:03:30","date_gmt":"2024-09-03T13:03:30","guid":{"rendered":"https:\/\/cheapwindowsvps.com\/blog\/how-to-configure-multiple-alternate-dns-names-for-a-windows-computer\/"},"modified":"2025-01-20T09:55:11","modified_gmt":"2025-01-20T09:55:11","slug":"how-to-configure-multiple-alternate-dns-names-for-a-windows-computer","status":"publish","type":"post","link":"https:\/\/cheapwindowsvps.com\/blog\/how-to-configure-multiple-alternate-dns-names-for-a-windows-computer\/","title":{"rendered":"How to Configure Multiple Alternate DNS Names for a Windows Computer"},"content":{"rendered":"<p><p>In scenarios involving system migration, accessing Windows servers by both the original and new hostnames is often crucial. To make a server recognizable by an alternate name, the most straightforward method involves adding a CNAME alias in the DNS that points to the original FQDN (A record).<\/p>\n<\/p>\n<p><p>To establish a CNAME alias for the former hostname, you can use the DNS Manager console by launching <code>dnsmgmt.msc<\/code> or employ the PowerShell command <a href=\"https:\/\/woshub.com\/create-manage-dns-zones-records-powershell\/\" rel=\"nofollow noopener\" target=\"_blank\">Add-DnsServerResourceRecordCName<\/a>:<\/p>\n<\/p>\n<p><p><code>Add-DnsServerResourceRecordCName -ZoneName woshub.loc -Name new-wks11 -HostNameAlias wks11.woshub.loc<\/code><\/p>\n<\/p>\n<p><p>However, a critical issue arises after setting up a DNS alias; Kerberos authentication fails when accessing the server via its new hostname. This failure occurs because the SPN (Service Principal Name) in the AD object isn&#8217;t updated when the DNS record is created.<\/p>\n<\/p>\n<p><p>Windows Server includes a native tool called <strong>netdom.exe<\/strong> that helps in adding an additional hostname. For instance, to assign a secondary hostname to the computer named <em>fs01<\/em>, you would execute the following command with an alternative FQDN:<\/p>\n<\/p>\n<p><p><code>netdom computername fs01 \/ADD new-fs01.woshub.loc<\/code><\/p>\n<\/p>\n<p><p>Ensure the newly assigned name is also registered in the DNS using the command:<\/p>\n<\/p>\n<p><p><code>ipconfig \/registerdns<\/code><\/p>\n<\/p>\n<p><p>The netdom command will register a CNAME record in DNS, add the new name to the <em>AlternateComputerNames<\/em> registry parameter (described below), and update the value of the <code>servicePrincipalName<\/code> and <code>msDS-AdditionalDnsHostName<\/code> attributes for the computer account in AD.<\/p>\n<\/p>\n<p><p>List all registered computer names:<\/p>\n<\/p>\n<p><p><code>netdom computername m-dc01 \/enum<\/code><\/p>\n<\/p>\n<p><p>Get registered SPNs for a computer account:<\/p>\n<\/p>\n<p>&#8220;`html<\/p>\n<p><p><code>setspn.exe -L fs01<\/code><\/p>\n<\/p>\n<p><p>The netdom.exe command is missing in Windows 10 and 11, so you&#8217;ll need to change the registry to add an additional hostname manually.<\/p>\n<\/p>\n<p><p>To add an alternate DNS name:<\/p>\n<\/p>\n<ol>\n<li>Under the <code>HKLMSystemCurrentControlSetServicesDNSCacheParameters<\/code> registry key, create a REG_Multi_SZ parameter called <strong>AlternateComputerNames<\/strong>.<\/li>\n<li>Specify an additional FQDN name (or multiple names) for this (one FQDN per line)<\/li>\n<li>Register computer names in DNS: <code>ipconfig \/registerdns<\/code><\/li>\n<li>Add the new computer name to the SPN:<br \/> <code>SETSPN -a host\/new-wks11 wks11<br \/> SETSPN -a host\/new-wks11_name.woshub.loc wks11<\/code><\/li>\n<\/ol>\n<p>&#8220;`<\/p>\n<p><p>To set up an additional NetBIOS name on a computer, initiate by generating the <strong>OptionalNames<\/strong> parameter (REG_Multi_SZ) in the <code>HKLMSystemCurrentControlSetServicesLanManServerParameters<\/code> registry key.<\/p>\n<p>Proceed by rebooting the lanmanserver service with the following commands:<\/p>\n<p><code>net stop lanmanserver<br \/> net start lanmanserver<\/code><\/p>\n<p>Should there be issues updating the computer\u2019s SPN in AD, establish a REG_DWORD parameter named <strong>DisableStrictNameChecking<\/strong> at <code>HKLMSystemCurrentControlSetServicesLanmanServerParameters<\/code> and assign it a value of <strong>1<\/strong>. This adjustment permits access to shared SMB folders on the computer using the new name.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In scenarios involving system migration, accessing Windows servers by both the original and new hostnames is often crucial. To make a server recognizable by an alternate name, the\u2026<\/p>\n","protected":false},"author":1,"featured_media":9915,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[99,108],"tags":[],"class_list":["post-9914","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-windows-11","category-windows-server-2022"],"_links":{"self":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts\/9914","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/comments?post=9914"}],"version-history":[{"count":1,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts\/9914\/revisions"}],"predecessor-version":[{"id":10309,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts\/9914\/revisions\/10309"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/media\/9915"}],"wp:attachment":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/media?parent=9914"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/categories?post=9914"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/tags?post=9914"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}