If the issue is related to the Remote Desktop Gateway, a registry adjustment may help. Registry Editor (regedit.exe). HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client Create a new DWORD (32-bit) Value RDGClientTransport and set its value to Restart your computer. Are you connecting to a local server cloud-hosted virtual machine? Fix Remote Desktop Error Code 0x904: 4 Working Solutions
: Test the connection using the host's IP address rather than its DNS name to rule out name resolution issues. Use the command Test-NetConnection [IP] -Port 3389 in PowerShell to verify the port is open. If the issue is related to the Remote
The culprit? An . Every RDP session relies on a digital certificate to secure the path. On this particular server, the certificate reached its end date and didn’t bother to renew itself. Without a valid "ID card," the client computer refuses to step inside, throwing the 0x904 error as it walks away. The Resolution Our admin takes the final steps to fix the narrative: 3389 or Test-NetConnection -ComputerName <
Corporate firewalls (like Zscaler, Blue Coat, or FortiGate) performing SSL inspection can modify the RDP-over-HTTPS traffic. They replace the RD Gateway’s certificate with their own, breaking the RDP protocol’s strict expectations. -Port 3389 (PowerShell).
telnet <host> 3389 or Test-NetConnection -ComputerName <host> -Port 3389 (PowerShell).