Remote Desktop error 0x904 (often accompanied by extended error 0x7) typically signals a breakdown in the initial handshake between your device and the remote host. While it is often labeled as a "network instability" issue, modern troubleshooting identifies it more precisely as a failure in certificate validation or a specific Windows 11 compatibility bug. Why You’re Seeing It
Expired RDP Certificates: The remote server uses self-signed certificates that don't always auto-renew. If they expire, the connection is instantly dropped after you enter credentials.
Windows 11 "Hostname" Bug: Users on Windows 11 (especially version 22H2 and later) frequently encounter this error when connecting via a computer name rather than an IP address.
Security Layer Mismatch: If the server requires Network Level Authentication (NLA) or TLS 1.2 but the client isn't configured for it, the connection will fail.
Packet Loss or VPN Lag: True to its generic label, a high-latency VPN or unstable Wi-Fi can trigger it by timing out the connection mid-handshake. Proven Fixes
Based on expert reviews from platforms like Reddit's Sysadmin community and Microsoft Q&A, try these steps in order:
Switch to IP Connection: In the Remote Desktop window, replace the computer name with its local IP address (e.g., 192.168.1.50). This is the most common workaround for Windows 11 users.
Renew Server Certificates: If you have access to the host, open certlm.msc, navigate to Remote Desktop > Certificates, and delete any expired ones. Restart the Remote Desktop Services (termserv) to force Windows to generate a new one.
Try the Microsoft Store App: Users on Microsoft's support forums report that the Microsoft Remote Desktop app (from the Store) often bypasses the 0x904 error even when the built-in mstsc.exe fails.
Azure VM Fix: If you are using an Azure VM, the issue is often a corrupt "MachineKeys" folder. Renaming C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys to MachineKeys_old and rebooting typically clears the error.
Firewall Exceptions: Ensure mstsc.exe is explicitly allowed through both your local and remote firewalls. Some security suites like Bitdefender have been known to block these connections unexpectedly.
Are you connecting to a personal PC or a Windows Server managed by an IT department? Fix Remote Desktop Error Code 0x904: 4 Working Solutions i remote desktop connection error code 0x904 better
Error code 0x904 is not a dead end—it’s a sign that your RDP security layer needs attention. By following this guide, you’ve moved past the generic “restart your computer” advice and implemented better fixes: resetting certificates, adjusting security layers, automating the repair, and preventing future failures.
Remember these key takeaways:
The next time someone types “i remote desktop connection error code 0x904 better” into a search engine, they’ll land here—and finally solve it for good.
Happy (and stable) remote connecting.
About the Author – Systems engineer specializing in Windows RDP, certificate services, and remote work infrastructure. If this article helped you, consider sharing it with a colleague who still restarts their router for error 0x904.
Remote Desktop error code (often accompanied by extended error code
typically indicates a network instability or a security certificate mismatch
. This error is common on Windows 11 and Windows Server 2022. Most Common Fix: Refresh the RDP Certificate
Expired or corrupt self-signed certificates are a frequent cause for this error. www.remoteaccesspcdesktop.com On the remote server certlm.msc , and hit Enter. Navigate to Remote Desktop Certificates Right-click and
any expired certificates (Windows will regenerate one automatically). Open Command Prompt as an administrator and run: restart-service termserv -force to restart Remote Desktop Services. www.remoteaccesspcdesktop.com Network & Connection Workarounds Unable to RDP into some Windows Servers - Error code: 0x904
Remote Desktop Connection Error Code 0x904 (often accompanied by extended error code 0x7) is a generic connection failure that typically stems from network instability, expired security certificates, or firewall blocks. It is most common in modern Windows 10/11 environments and Windows Server setups. Core Causes & Fixes 1. Expired RDP Certificates (Most Common) Remote Desktop error 0x904 (often accompanied by extended
The error often triggers when a server's self-signed RDP certificate expires, as they do not always renew automatically.
Fix: Log into the affected server locally. Open the Certificates MMC snap-in (certlm.msc), navigate to Remote Desktop > Certificates, and delete any expired certificates. Restart the Remote Desktop Services (TermService) to force Windows to generate a new certificate. 2. Network & VPN Instability
Insufficient bandwidth, high packet loss, or slow VPN speeds frequently cause 0x904.
Fix: Verify your internet speed on both ends. If using a VPN, try reconnecting or switching to a more stable ISP. 3. Firewall & Antivirus Obstruction
Security software may block mstsc.exe even if Remote Desktop is technically "enabled".
Fix: Access Allow an app through Windows Firewall and ensure both Remote Desktop and Remote Desktop (WebSocket) are checked for both Private and Public networks. Some users find that adding rdp.exe or mstsc.exe as an exception in third-party antivirus (like Bitdefender) resolves the issue. 4. Windows 11 Compatibility Bugs
Users have reported this error specifically after Windows 11 updates.
Workaround: Try connecting via the IP address of the remote machine instead of its hostname. Alternatively, download the Microsoft Store version of the Remote Desktop app, which often bypasses bugs found in the standard legacy client. Fixed: Remote Desktop 0x904 Error [2 Solutions] - AnyViewer
Remote Desktop error code is often a result of expired or corrupt certificates unstable network connections Windows 11 compatibility bugs www.remoteaccesspcdesktop.com Most Effective Fixes Renew RDP Certificates (Primary Solution)
: This error is frequently caused by expired self-signed certificates on the target server. Log into the target server directly. Open the Certificates MMC snap-in ( certlm.msc Remote Desktop Certificates the expired certificate. Restart the service via Command Prompt (Admin): restart-service termserv -force . Windows will automatically generate a fresh certificate. Fix Certificate Corruption (Azure VMs)
: If your target is an Azure Virtual Machine, the certificate store might be corrupt. In the Azure Portal, use the Run Command tool to run this PowerShell script: Conclusion: You Deserve a Better RDP Experience Error
Rename-Item -path "C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys" -NewName "MachineKeys_old" the server to reset the store. Windows 11 Workarounds : Windows 11 (builds 22H2 and later) has known RDP bugs. Use the IP Address : Instead of using the computer's hostname (e.g., ), type in its direct IP address (e.g., 192.168.1.50 Switch Apps Remote Desktop app from the Microsoft Store instead of the built-in "Remote Desktop Connection" (
), as it uses a different networking stack that often bypasses this error. Network and Firewall Stability is open on the target computer's firewall.
If using a VPN, a slow or unstable connection can trigger 0x904. Reconnect to your VPN or try a more stable internet source. www.remoteaccesspcdesktop.com Are you connecting to a local office computer Azure Virtual Machine Fix Remote Desktop Error Code 0x904: 4 Working Solutions
On the RDP server (Windows):
certlm.msc (Local Machine certificates)Remote Desktop folderNLA can enforce strict security checks that fail due to licensing mismatches.
On the remote host:
Better because: Bypasses an unnecessary security handshake that sometimes exposes licensing bugs.
On the remote (host) computer:
Win + R, type gpedit.msc, hit Enter.Computer Configuration → Administrative Templates → Windows Components → Remote Desktop Services → Remote Desktop Session Host → Securitygpupdate /force in Command Prompt.Better approach: If you need SSL/TLS, choose SSL (TLS 1.0) only if the client supports it. Modern Windows prefers TLS 1.2+.
A truly “better” resolution to error 0x904 isn’t just manual steps—it’s automation. Here’s a PowerShell script that detects and repairs the most common 0x904 causes on a local or remote machine. Run it on the host with admin privileges:
# Fix RDP Error 0x904 - Certificate & Security Layer Reset
Write-Host "Fixing RDP Error 0x904..." -ForegroundColor Cyan
Step 4: Disable Conflicting Software
- Disable antivirus software: Temporarily disable antivirus software that may be interfering with RDC.
- Check for conflicting software: Identify and disable any software that may be using the same ports as RDC (e.g., other remote access tools).
3. Enable Network Level Authentication (NLA)
On the remote PC:
- Open
sysdm.cpl → Remote tab
- Check "Allow connections only from computers running Remote Desktop with NLA"