Hello Sarah,
This behaviour is often related to differences in authentication between hostname-based and IP-based SMB connections, particularly Kerberos and NTLM. When connecting through a hostname, Windows can use Kerberos if a valid CIFS SPN is registered, whereas connecting through an IP address typically falls back to NTLM, which may be blocked by domain security policies. I'd first run klist to check Kerberos tickets, then use Get-SmbConnection to inspect the active SMB connections and their authentication details. You should also review the policies under Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options, particularly Network security: Restrict NTLM on both the client and server, and check the relevant NTLM operational logs in Event Viewer. To verify the Kerberos configuration, run setspn -Q cifs/servername and confirm that the CIFS SPN is registered against the correct computer or service account. Also, check whether SMB signing requirements, firewall rules, or existing cached credentials are affecting the connection; avoid enabling unrestricted NTLM or disabling security policies just to make IP-based access work. In most domain environments, using the server hostname or FQDN is the recommended approach because it supports Kerberos authentication and avoids unnecessary NTLM fallback.
For reference:
Microsoft Learn: SMB Security
Microsoft Learn: Restrict NTLM
Microsoft Learn: SetSPN
Hope this helps!
Harry P.