DNS resolution issues often cause 0x904. Bypassing the hostname can establish a more stable link. Open the client.

Go to "Allow an app through Windows Firewall" and ensure both Remote Desktop and Remote Desktop (WebSocket) are checked for Private and Public networks.

and test the Remote Desktop connection.

How to Fix Remote Desktop Connection Error Code 0x904 The (often accompanied by extended error code 0x7) is a common issue in Windows 10, 11, and Windows Server environments. It typically signifies a failure to establish a secure TLS tunnel, often due to expired RDP certificates , unstable network connections , or firewall misconfigurations . 1. Renew Expired RDP Certificates

Even if RDP is "enabled," your firewall might still be blocking specific traffic types needed for the connection.

If you cannot physically access the remote computer or cannot sign out the stuck session, you can force a logoff remotely using the Command Prompt. You must have administrative privileges on the remote machine to do this.

The firewall on either the client or the remote server may be blocking the connection. Check Exceptions