Skip to content

Est. 2011ยทMicrosoft Partner 7033487ยทDelivery under 3 minยทSupport 7 days a week

Your vault is empty.

Free Fix 0x00000904

RD Gateway error 0x00000904 and 0x00000103: tunnel dies before the desktop

11 min read Updated October 4, 2026 Windows Server: RDS, Hyper-V & Clustering

Fix it now

These are gateway failures reported by the Remote Desktop client, and they describe a tunnel that could not be established rather than a desktop that could not start. In most deployments the cause is the certificate: the name on it, the chain behind it, or the name the client was told to dial.

First line from the failing client, second in an elevated prompt on the gateway

Test-NetConnection gateway.example.com -Port 443
netsh http show sslcert
  1. Note the exact gateway name the client uses. In the Remote Desktop client open Show Options, Advanced, Settings and read the gateway server name, or open the .rdp file in Notepad and read the gateway host name line.
  2. Browse to https://gateway.example.com/RDWeb from the same client and inspect the certificate. The name you dialled must appear in the subject or the subject alternative names, the dates must be current, and the chain must resolve.
  3. On the gateway, compare the hash from netsh http show sslcert with the thumbprint of the certificate you meant to use. A renewed certificate that was never rebound is the single most common cause of this appearing overnight.
  4. On the client, open certlm.msc and confirm the issuing authority’s root, and any intermediate, are present and trusted.

The error arrives in a second or two rather than after a timeout. That is a decision, not a wait, and it tells you the certificate was evaluated and rejected rather than the traffic being dropped somewhere in the path.

If the tunnel opens, stop here. If the certificate looks correct in a browser and the client still fails, the next section covers the third name in play and the protocol floor underneath it.

Why it happens

An RD Gateway connection is RDP carried inside HTTPS. Before a byte of RDP is exchanged, the client opens a TLS connection on port 443 and checks the certificate offered: that it is in date, that its chain leads to a root the client already trusts, and that the name typed appears on it. Any one of those failing ends the connection there. That is why the error is instant, why nothing appears in the session host logs, and why the gateway’s own policies are irrelevant to it.

The name check catches most deployments, because there are usually two names in play and sometimes three. Internally the gateway is known by its domain name; remote users dial a public one. If the certificate carries only one of them, half your users work. The name embedded in the .rdp file that RD Web Access hands out is a third value, and it can drift out of step with both without anyone touching the certificate.

The trust check catches the rest. A certificate from an internal certification authority is trusted automatically by domain-joined machines, because the root arrives through Group Policy, and by nothing else. Home computers, personal tablets and contractor laptops see an unknown issuer and refuse the tunnel. A missing intermediate does the same thing, because Remote Desktop clients are far less forgiving than browsers about fetching what the server did not send.

Microsoft publishes what an RDS certificate has to be rather than what these client error numbers mean. The requirements are worth knowing because they are a checklist you can run against the certificate in front of you: issued for Server Authentication, issued by an authority trusted by both the servers and the clients, and imported with an exportable private key.

The certificate does not carry the name clients dial

You have this one if The browser reports a name mismatch, or the subject alternative names list holds the internal name only.

  1. Inspect the certificate and list its subject alternative names. Every name any client might use has to be there.
  2. Request a replacement covering the external name, and the internal one too if internal users also go through the gateway.
  3. Import it into the local computer Personal store on the gateway, with its private key.
  4. Assign it in Server Manager, Remote Desktop Services, Overview, TASKS, Edit Deployment Properties, Certificates on a full deployment, so every role gets the same one, or in Remote Desktop Gateway Manager on a standalone gateway.

A wildcard certificate covers the level of the name it was issued for and not a deeper subdomain, which is a surprisingly common way to end up with a certificate that is valid and useless.

The chain is incomplete or the root is not trusted on the client

You have this one if The same connection succeeds from a domain-joined machine and fails from an unmanaged one.

  1. On the gateway, open the certificate and check the certification path. Install the issuer’s intermediate certificate into the local computer Intermediate Certification Authorities store if one is missing.
  2. For an internally issued certificate, either distribute the root to non-domain clients, or replace it with one from an authority those clients already trust so there is nothing to distribute.
  3. Retest from a machine that has never connected before, not from one you have already fixed by hand.

A renewed certificate was never bound to the listener

You have this one if Connections worked until the renewal date. The new certificate is in the store and the old one is still being served.

  1. Run netsh http show sslcert on the gateway and read the certificate hash that is actually bound.
  2. Compare it with the thumbprint of the certificate you meant to use.
  3. Rebind through Remote Desktop Gateway Manager or the deployment properties rather than by editing the binding directly, so the service updates its own configuration as well.

Automated renewal tools routinely install a new certificate correctly and never touch the binding, which is why this looks like it happened for no reason.

The published gateway name does not match reality

You have this one if The certificate is valid and correct when inspected in a browser and the Remote Desktop client still fails.

  1. Open the .rdp file the user launches and read the gateway host name value it contains.
  2. In Server Manager, Remote Desktop Services, Edit Deployment Properties, RD Gateway, confirm the server name matches a name on the certificate.
  3. Correct it, then have users download a fresh .rdp file or refresh their RemoteApp and Desktop Connection subscription. Cached files keep the old name indefinitely.

TLS was hardened past what the client can negotiate

You have this one if It started after a security change, and only older clients or older operating systems are affected.

  1. Check which protocol versions and cipher suites remain enabled on the gateway after the change.
  2. Update the affected clients to a current Remote Desktop client build. That is the fix.
  3. Only if you have no alternative, re-enable the protocol version while those clients are updated, and record it as a dated exception with an owner.

Full reference

Matching the symptom to the layer

What you see Where to look
Works inside the office, fails from outside The external name is missing from the certificate, or split DNS points somewhere else
Works on domain machines, fails on personal devices An internal authority issued the certificate and its root is not trusted off-domain
Everything broke on one specific day The certificate expired, or was renewed and never rebound
The browser shows a valid certificate and RDP still fails The name published in the .rdp file differs from the one the certificate covers
Only older clients fail Protocol or cipher floor raised past what those clients negotiate

What the certificate has to be

  • Issued for Server Authentication.
  • Issued by a certification authority trusted by the RDS servers and by the clients. For unmanaged devices that means a public authority, because there is nothing to distribute a root through.
  • Imported with an exportable private key, and held in the local computer Personal store on the gateway.
  • Carrying every name any client might dial, in the subject or the subject alternative names.
  • In date, with a renewal process that rebinds as well as reissues.

Assigning it once, for the whole deployment

On a full RDS deployment, assign certificates at Server Manager, Remote Desktop Services, Overview, Deployment Overview, TASKS, Edit Deployment Properties, Certificates. That page covers the gateway, the web access role and the broker together, which is what stops the three drifting apart. Server Manager can also add the certificate to the Trusted Root Certification Authorities store on the destination computers as part of the same operation, which is useful inside the deployment and does nothing for external clients.

Reading the binding rather than the store

Elevated prompt on the gateway

netsh http show sslcert
netsh http show iplisten
netsh http show urlacl

The certificate store shows what is installed; the HTTP.sys binding table shows what is actually being served. A perfectly valid certificate that is not the one bound to the endpoint produces exactly the failure on this page, and no amount of inspecting the store will reveal it. Compare the hash in the binding with the thumbprint you expect, every time.

When it is not the certificate

  1. Confirm something is listening: Test-NetConnection gateway.example.com -Port 443 from outside your network.
  2. Confirm the name resolves to the address you expect from outside, not just from inside. Split DNS is a common surprise.
  3. Confirm the client is not being intercepted. A TLS-inspecting proxy in the path substitutes its own certificate, which a Remote Desktop client will refuse even when a browser accepts it.
  4. If the tunnel opens and the refusal comes afterwards, you have an authorisation problem rather than a certificate one, and the gateway policy logs will say so.
  5. If nothing accepts the connection at all, the listener itself never came up, which is a binding problem on the gateway rather than a trust problem on the client.

What a certificate purchase does and does not buy

A certificate from a publicly trusted authority is the least effort where unmanaged devices connect, because there is nothing to distribute. Where every client is domain-joined, one from your own certification authority works identically and costs nothing, because the root is already in place through Group Policy. Neither route involves a Windows or RDS licence, and a self-signed certificate is a placeholder rather than an option: it works only where you have installed that exact certificate into the trusted roots of every client, which stops being manageable past a handful of machines.

Every code this article covers

Code What it points at Source
0x00000904 Not published by Microsoft. Reported by the Remote Desktop client when the tunnel to the gateway could not be established; diagnose from the certificate, the name and the binding not published by the vendor
0x00000103 Not published by Microsoft. Reported against the same stage of the connection; treat it as the same class of failure not published by the vendor
0x00000005 Not published by Microsoft. Appears where the attempt was refused rather than dropped, so check the gateway policy logs as well as the certificate not published by the vendor

Confirm the fix worked

  1. A client outside your network connects and the session opens with no certificate prompt.
  2. The certificate the gateway presents carries the name that client dialled, in date, with a chain that resolves on an unmanaged machine.
  3. netsh http show sslcert on the gateway shows a bound hash matching the intended certificate.
  4. The gateway name in a freshly downloaded .rdp file matches a name on the certificate.
  5. A domain-joined client and an unmanaged client both connect, so you have tested both trust paths.

Questions people ask about this

Do I have to buy a certificate to fix this?

No. A publicly trusted certificate is the least effort when unmanaged devices connect, because there is nothing to distribute. If every client is domain-joined, one from your own certification authority works identically and costs nothing. Neither involves a Windows licence.

Can I use a self-signed certificate?

Only where you have installed that exact certificate into the trusted roots of every client, which is unmanageable beyond a handful of machines. Treat the default one as a placeholder.

Why does the error appear instantly rather than after a timeout?

Because the rejection is a decision, not a wait. The client evaluates the certificate as soon as it is offered. A timeout would instead point at traffic being dropped in the path.

Does replacing the certificate interrupt users?

Rebinding restarts the gateway listener, so connections in progress are dropped and users reconnect. Sessions already open on the session hosts survive.

The certificate is valid in a browser but RDP still fails. What now?

Read the gateway name in the .rdp file the user actually launches. It is a third value alongside the internal and external names, it caches on the client, and it can point at a name the certificate does not cover.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

License Error Event ID 1128 and 1129: the RDS licensing grace period has run out, or is about to Free Fix 0x807800C5 and Event ID 521: Windows Server Backup dies at the snapshot License Error Event ID 12002 and 12032: WSUS web services stop answering and clients stall Free Fix Event ID 1 and 20 from iScsiPrt: the initiator keeps losing its target
โ† Back to Knowledge Base