Windows – Can ping by hostname, can RDP by IP, but cannot RDP by hostname

dnsipv6networkingremote desktopwindows-networking

I'm trying to Remote Desktop to another Windows PC. Both computers are in the same WORKGROUP. I can ping the remote computer by its hostname, which responds with its IPv4 address. I could get that work after running Prefer IPv4 over IPv6 in prefix policies EasyFix from Microsoft. Before running the EasyFix, pinging remote host responded with IPv6.

I can also connect with Remote Desktop Connection using IPv4 and it works, however, trying to Remote Desktop with hostname gives me this error:

Remote Desktop can't find the computer "OTHERWINPC". This might mean that "OTHERWINPC" does not belong to the specified network. Verify the computer name and domain that you are trying to connect to.

What can be the issue?

Best Answer

Answering myself: The fix was something really weird. First I made sure that both local computer and remote computer prefer IPv6 over IPv4 using the EasyFix. Then I noticed I could not ping the remote computer when I use all caps for hostname. I got:

Ping request could not find host MYHOME-PC. Please check the name and try again.

but could ping with any other casing like ping myhome-pc or ping MyHome-PC that came back with IPv6. I used all lowercase hostname to connect with remote desktop and that worked!

Related Question