SMB Share Access Fails Through a DNS CNAME Alias (Target Account Name Is Incorrect, Access Denied)

A file share works by server name but not through its DNS CNAME, with The target account name is incorrect or Access denied? Add the alias with netdom computername /add, or list it in BackConnectionHostNames on the server.

Home › Guides › SMB share access fails through a DNS CNAME alias

Last updated 22 November 2026

Quick answer

Two different problems break access to a Windows file share through a DNS CNAME alias. From other computers (Windows 10, Windows 11, Windows Server 2016 or later), \\CNAME\share_name fails with "You might not have permission to use this network resource" plus "Logon Failure: The target account name is incorrect" or "Account restriction is preventing this user from signing in", while the NetBIOS name and FQDN work. Microsoft's fix is not to use a CNAME for the file server's extra name at all: add the alias as an alternate computer name with netdom computername <ComputerOriginalName> /add:<Alias>. On the server itself, opening its own share by FQDN or CNAME gives repeated logon prompts, "Access denied" or "No network provider accepted the given network path" because of the NTLM loopback check. Set DisableStrictNameChecking to 1, then list the alias names in BackConnectionHostNames (recommended) rather than turning the loopback check off.

Which problem do you have?

Where it failsWhat you seeCause Microsoft givesFix
Other computers, through the CNAME only"\\CNAME.contoso.com\share_name is not accessible" with "Logon Failure: The target account name is incorrect" or "Account restriction is preventing this user from signing in"SMB server configuration or hardening, or no service principal name (SPN) for the CNAMEReplace the CNAME with an alternate computer name: netdom computername ... /add:
The server itself, through its FQDN or CNAMERepeated logon windows, "Access denied" or "No network provider accepted the given network path"; Event ID 537 in the Security logThe loopback check (DisableLoopbackCheck = 0 by default)DisableStrictNameChecking = 1, then BackConnectionHostNames with the alias names
Local apps such as SQL Server or IIS making NTLM requests to the same machineLocal NTLM authentication fails after a security updateCovered in the "Known issues" section of security update KB 957097, which Microsoft points toFollow the Known issues section of KB 957097

Access through a CNAME fails from other computers

Microsoft's scenario: an SMB file server (a Windows Server or a NAS) whose shares answer on the NetBIOS name, the FQDN and a CNAME. From a Windows 10, Windows 11 or Windows Server 2016+ client, the NetBIOS name and FQDN work, but every form that uses the CNAME fails:

\\CNAME.contoso.com\share_name
\\CNAME\share_name
NET USE * \\CNAME\share_name
NET USE * \\CNAME.contoso.com\share_name
New-PSDrive -Name "x" -PSProvider "FileSystem" -Root "\\CNAME\share_name" -Persist

The error is "\\CNAME.contoso.com\share_name is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions." followed by either Account restriction is preventing this user from signing in (with examples such as blank passwords or limited sign-in times) or Logon Failure: The target account name is incorrect.

Microsoft gives two possible causes: a configuration or SMB server service hardening issue, or a missing SPN for the CNAME on the file server.

Fix: use an alternate computer name instead of the CNAME

Microsoft's resolution is to stop using a DNS CNAME for the file server's alternative name and define the alias with netdom:

netdom computername <ComputerOriginalName> /add:<Alias>

Microsoft's article on computer name aliases in place of DNS CNAME records (linked from the source) has the details. The same command is the first step of a domain controller rename, so the syntax is also on the PowerShell Cheat Sheet.

Access by FQDN or CNAME fails on the server itself

This one goes back to Windows Server 2003 SP1 (KB 926642), which introduced the loopback check. On the server, opening \\servername\sharename by its FQDN or CNAME gives repeated logon windows, "Access denied" or "No network provider accepted the given network path", and Event ID 537 is logged in the Security log. The same path works from any other computer, and on the server itself \\<IP address> and \\<NetBIOS name> still work. The check is on by default: DisableLoopbackCheck under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa is 0.

Microsoft's resolution first sets the DisableStrictNameChecking registry entry to 1, then uses one of two methods. Both lower security, so Microsoft asks you to weigh the risk first, and both need a restart. Back up the registry before you change it.

Method 1 (recommended): BackConnectionHostNames

  1. Open HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0 in Registry Editor.
  2. Create a Multi-String Value named BackConnectionHostNames.
  3. Enter the CNAME or DNS alias names used for the local shares, one per line. If a BackConnectionHostNames entry already exists as REG_DWORD, delete it and create it again as Multi-String.
  4. Restart the computer.

Unlike Method 2, this leaves the loopback check turned on and only accepts the names you list.

Method 2: turn off the loopback check

Create the DWORD DisableLoopbackCheck under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa, set it to 1 and restart. Microsoft does not recommend it: it opens the server to man-in-the-middle attacks on NTLM. Prefer Method 1.

Related errors

"The target account name is incorrect" is the same text Active Directory replication shows as error 1396, and an SPN mismatch also causes the target principal name is incorrect. If clients resolve the server to an address on the wrong network, see unwanted NIC registered in DNS.

Related tools and guides

Look up Security events such as 4625 failed logons in the Windows Event ID Lookup, copy the netdom computername lines from the PowerShell Cheat Sheet, pull the server names out of SPN or nslookup output with the Regex Tester, check that the file server addresses are in the subnets your clients use with the IPv4 Subnet Calculator or IPv6 Subnet Calculator, and identify the vendor of a NAS that hosts the share with the MAC Vendor Lookup. Related guides: replication error 1396 target account name is incorrect, unwanted NIC registered in DNS, DNS record cannot be deleted and common Windows DNS Server and DHCP Server errors.

Every Windows DNS Server and DHCP Server event and symptom in one place: common Windows DNS Server and DHCP Server errors.

FAQ

Why can I open a share by server name but not by its CNAME?

Microsoft names two causes: an SMB server configuration or hardening issue, or a missing service principal name (SPN) for the CNAME. The error ends with Logon Failure: The target account name is incorrect or Account restriction is preventing this user from signing in.

What does Microsoft recommend instead of a CNAME for a file server?

Define the alias as an alternate computer name with netdom computername and the /add switch, instead of using a DNS CNAME record.

Why does the server fail to open its own share by FQDN or alias?

The loopback check, added in Windows Server 2003 SP1, rejects NTLM requests back to the same machine under another name. You see repeated logon prompts, Access denied or No network provider accepted the given network path, and Event ID 537.

Should I use BackConnectionHostNames or DisableLoopbackCheck?

BackConnectionHostNames, the method Microsoft recommends. It lists the alias names one per line and keeps the loopback check on. DisableLoopbackCheck set to 1 turns the check off and opens the server to man-in-the-middle attacks on NTLM.

Do I need to restart after the registry change?

Yes. Both the BackConnectionHostNames and the DisableLoopbackCheck methods need a restart of the computer to take effect.

Want the full kit?

Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.