If your computer says it can’t connect to the Remote Desktop Gateway server, the fix usually involves checking the gateway address, verifying your credentials, adjusting the client’s proxy settings, or ensuring the gateway service is running on the server. This article walks through the most common causes and step-by-step solutions for Windows Remote Desktop Connection (RDC) clients.
What Is a Remote Desktop Gateway?
A Remote Desktop Gateway (RD Gateway) is a role in Windows Server that lets authorized users connect to internal network resources (like desktops or apps) from the internet. Instead of needing a VPN, the gateway sits on the network edge and relays Remote Desktop Protocol (RDP) traffic over HTTPS (port 443). This means you can use the same port as secure web traffic, which is convenient when you’re behind a firewall that blocks direct RDP.
The gateway also allows you to connect to multiple internal computers through a single entry point, and it can apply connection authorization policies (CAPs) and resource authorization policies (RAPs) to control who gets in and what they can access.
Why the Connection Fails: Common Causes
When you see the error “Your computer can’t connect to the remote desktop gateway server,” the problem can be on the client side, the server side, or somewhere in between. Here are the most frequent culprits:
- Incorrect gateway address or port – The address you typed is wrong, or the gateway is listening on a non-default port.
- Network connectivity – Your computer can’t reach the gateway over the internet (firewall, DNS, or ISP issues).
- Authentication problems – Your username, password, or smart card credentials are rejected by the gateway.
- Client configuration – The Remote Desktop client has a stale gateway setting or uses a proxy that blocks the connection.
- Server-side issues – The RD Gateway service is stopped, the certificate is invalid, or the server is overloaded.
- Time and date mismatch – If your computer’s clock is off, TLS/SSL handshake with the gateway fails.
Step-by-Step Fixes to Try
1. Verify the Gateway Address and Port
Open Remote Desktop Connection (mstsc.exe). Click the Show Options arrow, go to the Advanced tab, and click Settings under “Connect from anywhere.” Ensure the gateway address is correct (e.g., rdg.example.com) and the port is 443 unless you know it’s different. If you’re using a non-standard port, add it like rdg.example.com:444.
2. Check Basic Network Connectivity
From your computer, open a command prompt and run:
ping rdg.example.com
telnet rdg.example.com 443
If ping fails, DNS or routing is broken. If telnet fails, the gateway isn’t reachable on that port – a firewall might be blocking it. Try a different network (like your phone’s hotspot) to rule out local network restrictions.
3. Confirm Your Credentials
Make sure you’re using the correct username format. For an on-premises domain, use DOMAIN\username or user@domain.com. If you’re using a Microsoft account, use that email. If the gateway requires a smart card, insert it and select the appropriate certificate.
4. Adjust Proxy Settings in the Client
In the same Advanced settings window, under “Proxy settings,” choose Use these proxy settings if you’re behind a corporate proxy. Or select No proxy if you’re not. A misconfigured proxy is a common cause of gateway connection failures.
5. Clear Stored Credentials and Cache
Sometimes the client caches old credentials or gateway info. In the Remote Desktop Connection window, on the General tab, uncheck “Allow me to save credentials” and delete any saved connections. Then try again.
6. Check the Server Side
If you have admin access to the RD Gateway server, verify the service is running: open Services.msc and look for Remote Desktop Gateway. Also check that the server’s firewall allows inbound HTTPS (443). If the server uses a self-signed certificate, the client will reject it unless you install it as a trusted root.
7. Synchronize Your Computer’s Clock
Go to Settings > Time & Language > Date & time and enable “Set time automatically.” A clock that’s off by more than a few minutes breaks TLS authentication.
What to Do If the Fix Doesn’t Work
If you’ve tried the above and still get the error, try these additional steps:
- Restart the Remote Desktop Client and your computer.
- Use a different client app, like Microsoft Remote Desktop from the Store, to see if the problem is specific to mstsc.exe.
- Check with your IT department if the gateway was recently changed (certificate renewal, new address).
- Look at the event logs on the server (under Applications and Services Logs > Microsoft > Windows > TerminalServices-Gateway) for specific error codes.
Understanding the Error Messages
The exact wording can give you a clue:
- “The remote desktop gateway server address is not valid” – The address is malformed or DNS can’t resolve it.
- “The connection was denied because the user account is not authorized” – The gateway’s RAP policy doesn’t allow you to access the target computer.
- “The connection was denied because the user account is not authorized for remote login” – You don’t have permission to log into the internal computer itself.
- “The server certificate is not trusted” – The client doesn’t trust the gateway’s certificate.
How to Prevent Future Connection Issues
Once you’re connected, a few good practices can reduce the chance of this error recurring:
- Keep your Windows client updated.
- Use the latest Remote Desktop client from Microsoft.
- If you’re an admin, ensure the gateway’s certificate is valid and issued by a public CA if possible.
- Document the correct gateway address and port for your users.
Frequently Asked Questions
Why does the Remote Desktop Gateway connection fail only on some networks?
This usually points to a firewall or proxy on that network blocking port 443 or using an HTTP proxy that intercepts HTTPS. Try using a different network or configure the client to bypass the proxy.
Can I connect to an RD Gateway without a VPN?
Yes, that’s the purpose of RD Gateway. It tunnels RDP over HTTPS, so you don’t need a VPN. However, you still need proper authentication and authorization.
What if the gateway is on a non-standard port?
You can specify the port in the gateway address field, like rdg.example.com:444. Make sure the server is configured to listen on that port and the firewall allows it.
Does the Remote Desktop Gateway work on Mac or mobile?
Yes, Microsoft Remote Desktop clients for macOS, iOS, and Android support RD Gateway. You enter the gateway address in the client’s connection settings.
Is it safe to use a self-signed certificate on the gateway?
It’s not recommended because clients will warn about the untrusted certificate. For production, use a certificate from a trusted public certification authority to avoid security warnings and potential man-in-the-middle attacks.
Why do I get a “cannot connect” error when the gateway is on the same LAN?
If you’re on the same network, you don’t need the gateway at all – you can connect directly to the internal computer’s IP. If you still use the gateway, ensure the client can reach the external address (which might be blocked by a hairpin NAT issue).
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- How to Enable Desktop Slideshow in Windows 10
- BattlEye Service Failed: Test Signing Fix
- Chrome Remote Desktop on Chromebook: Setup Guide
- App Store Missing on iPad? Fix It
- How to Unroot Samsung Galaxy Core LTE
- Ways to Create More Disk Space in Windows 10