> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/gateway/help/troubleshooting/recording-tls-certificate.md). Agents can also search and read this documentation through its [MCP server](https://docs.devolutions.net/~gitbook/mcp).

# Invalid TLS certificate for session recording

Fix session recording through Devolutions Gateway that fails because of an invalid gateway TLS certificate: name, chain, dates, SHA-1, revocation.

A recorded session doesn't start, stops with a recording error, or Remote Desktop Manager reports that it can't reach the recording server, while the same session works without recording. When the recording goes to ***Devolutions Gateway***, Remote Desktop Manager sends it over HTTPS to the gateway URL, so the computer of Remote Desktop Manager must accept the certificate of the gateway. With the recording mode ***Required***, the session is closed when the recording can't start.

## Why it happens

The certificate of Devolutions Gateway is considered invalid on the computer of Remote Desktop Manager. The most common causes:

* **Domain mismatch**: the certificate is issued for another name. For example, it is issued for `example.loc` while the gateway URL uses `not-example.loc`. The name must be in the Subject Alternative Name (SAN) of the certificate.
* **Break in the chain of trust**: the certificate authority isn't trusted on the client, or the intermediate certificates are missing from the certificate file of the gateway.
* **Self-signed certificate**: clients don't trust it unless it is trusted explicitly.
* **Incorrect date or time on the client**: a wrong clock on the computer of Remote Desktop Manager makes a valid certificate look expired or not yet valid.
* **Expired certificate**.
* **Outdated hash algorithm**: the certificate is signed with SHA-1 (or MD5) only, which is no longer considered secure.
* **Revoked certificate**: the issuing authority revoked it.
* **Broken certificate structure**: the certificate has an invalid digital signature or another structural problem.
* **Misconfigured certificate**: the wrong certificate or key was installed, for example a CA certificate instead of the server certificate, or a certificate without the ***Server Authentication*** Extended Key Usage.
* **Self-signed certificate and Sophos**: when the client runs Sophos, the certificate can be replaced by an untrusted one, which bypasses the Remote Desktop Manager option to allow self-signed certificates.

## Fix it

1. On the computer of Remote Desktop Manager, open `https://<gateway host>:<port>/jet/health` in a browser. The browser shows the certificate problem, if any, and the certificate it received.
2. Check the name: the host name of the gateway URL, as saved in Devolutions Server or Devolutions Cloud, must be in the SAN of the certificate.
3. Check the chain: install the root certificate on the clients, and make sure the certificate file of the gateway contains the intermediate certificates. Re-export a `.pfx` file with all certificates in the path.
4. Check the dates: the clock of the client, and the validity period of the certificate.
5. Replace a SHA-1, revoked, expired or misconfigured certificate with a new one that has a SAN and the ***Server Authentication*** EKU. See [Change the Devolutions Gateway certificate](https://docs.devolutions.net/gateway/guides/certificates/change-certificate.md).
6. With a self-signed certificate on a client that runs Sophos, add an exception for the gateway address in Sophos, or use a certificate from a trusted authority.
7. Restart the Devolutions Gateway service after replacing the certificate, then open the recorded session again.

When Devolutions Gateway itself refuses the certificate, it doesn't start at all: see [Devolutions Gateway troubleshooting](https://docs.devolutions.net/gateway/help/troubleshooting/general.md). The Windows installer checks a certificate file when you select it and warns, for example, "The certificate is missing the Subject Alternative Name extension", "The certificate file is missing one or more intermediate certificates. Re-export it with the intermediates included so clients can verify the certificate." or "The certificate is self-signed. Clients will not trust it unless they explicitly trust the certificate."

## If it still fails

* Check the recording folder: see the ***Session recording fails*** section of [Devolutions Gateway troubleshooting](https://docs.devolutions.net/gateway/help/troubleshooting/general.md).
* Check [Recording storage and path](https://docs.devolutions.net/gateway/guides/recording/storage.md).
* Contact [Devolutions support](https://devolutions.net/support/) with the Devolutions Gateway logs and the Remote Desktop Manager logs.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/gateway/help/troubleshooting/recording-tls-certificate.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
