In this article, we will take a look at the basic techniques for diagnosing a problem with Remote Desktop Connection. For example, when you try to establish a connection to the remote server using the standard client mstsc.exe (Remote Desktop Connection), the message “Initiating Remote Connection …” appears, and then the user receives an error: Remote Desktop can’t find the computer %RDPHostName%. This might mean that %RDPHostName% does not belong to the specified network. Verify the computer name and domain that you are trying to connect to.
How to Fix the Error: Remote Desktop Can’t Find the Computer on Windows?
In most cases, this error means that there are problems with your DNS servers (or DNS records on them), because of which your computer can’t resolve the specified host name.
First of all, make sure that you have specified the correct hostname of the remote RDP host in the Computer field.
Try to connect to the RDP server by IP address instead of the DNS name. If the RDP connection by an IP address is established correctly, this means that the issue is related to DNS.
Possible reasons for the DNS problem are:
- Incorrect IP addresses of DNS servers are specified in the settings of your Windows computer;
- On your computer, the host file contains incorrect entries for the RDP host names;
- Your DNS servers are not available (the access is blocked by a firewall or server is down);
- There is no DNS record in the DNS zone for your RDP host or the record points to the wrong IP address.
Try to find out if your DNS server knows the FQDN of the RDP server you are connecting to (%RDPHostName%). Open an elevated Command prompt and run the command:
Make sure that the command returned the IP address of the remote server, for example:
If the command returned an incorrect entry, try to flush DNS cache (ipconfig/flushdns) on the client and try to resolve RDP hostname again.
If the nslookup command returns a “DNS request timed out” error, it means that your DNS server is not available (offline, blocked by a firewall) or the wrong DNS server is specified in your network card settings.
Check the preferred and alternate DNS server IP addresses specified in the network connection settings. You can get local DNS server addresses using the following PowerShell command:
Get-DnsClientServerAddress | Select-Object –ExpandProperty ServerAddresses
If you have assigned the DNS server addresses manually, check with your network administrator that they are correct. If the DNS server settings are assigned automatically by the DHCP server (Windows Server DHCP or Cisco DHCP server), make sure they match your infrastructure. In the last case, you can refresh your IP settings using the ipconfig command:
Ipconfig /release Ipconfig /renew
If the above advice didn’t help, please make sure that the outbound DNS client traffic is allowed in your firewall. If you are using Windows Defender Firewall with Advanced Security, you can add the firewall rules to accept any inbound traffic on port 53 (both UDP and TCP).
Hint. Or just reset your Windows Firewall settings to default state.
If the Nslookup command still returns an invalid entry, open the local hosts file with the command:
If there are no entries for your RDP server in the file, you can try to add them manually (this way you can bypass the wrong records your DNS server returns). You need to add a string to a hosts file in the following format:
You can use the following batch script to add new entries to your host file. Just replace the values in the script with the IP addresses and FQDN names of your RDP hosts or RDS servers:
@echo off set hostspath=%windir%\System32\drivers\etc\hosts echo 192.168.50.20 rds1.theitbros.com >> %hostspath% echo 192.168.10.29 rdphost1.theitbros.com >> %hostspath% exit
If the problem is resolved, it means that your DNS server is misconfigured. You need to check the entries on it or report the problem to the DNS administrator.
If you a member of the DNS admins domain security group, you can check the DNS records using the DNS manager mmc snap-in (dnsmgmt.msc).
Connect to a DNS server (usually it is a closes domain controller), expand the DNS zone, and find the A or CNAME record of your RDP host. Make sure it has the correct IP address.
If there are lot of records in the DNS zone, you can use the View > Filter menu to quickly find the DNS records you need.
Next, check the availability of the RDP server with the ping command:
Then you should check that the RDP port 3389 (TCP) is accessible on the server from the client (this is the port for RDP connection by default). The easiest way to check the port availability is using the PowerShell command:
Test-NetConnection rdphostname.contoso.com -port 3389
If the command returned TcpTestSucceeded: False, this means that the RDP service on the remote computer is disabled (you can try to enable Remote Desktop remotely), or the connection is blocked by the firewall on the client, server, or network routers.
A few tips to check if you can’t connect to an RDP server:
- Try to update the version of your RPD client (especially if you are using Windows XP, Windows 7 or 8.1);
- Try to use an alternative RDP client (RDCMan);
- Temporarily disable the antivirus and firewall on the client and server side and check the RDP connection;
- If you are connecting from a Windows XP client and the NLA (Network Level Authentication) is enabled on the server, then on the client side XP you can enable NLA support only through the registry;
- Remote connection is not possible if the user account under which you are connecting does not have a password.
Remote Desktop Can’t find the Computer through the RDWeb Gateway
In some cases you can get an error the “Remote Desktop can’t find the computer” when you trying to create a remote RDP connection or to run a RemoteApp hosted on the Remote Desktop Gateway. You can see the following error after successful authentication on RDWEB Gateway.
RemoteApp Disconnected – Remote desktop can’t find the computer FQDN.
First, try to specify the correct RD Gateway address in the RDP connection settings manually (the connection through RDWebAccess is performed not via standard port 3389, but through HTTPS – 443 port) and try to connect. If the connection is successfully established, then you have a misconfigured RDWebAccess server.
To fix the problem, open the IIS Management console on the RD Web Access server. Go to Sites > Default Web Site > RDWeb > Pages. Open the Application Settings section and in the DefaultTSGateway parameter specify the external DNS name of your RD Gateway server.
Now refresh the RDWeb page and try to establish an RDP connection again.