I've read that it's possible to have multiple certificates on one domain. My question is whether all these certificates should be trusted and valid or whether one valid trusted certificate is enough for browsers to trust it.

The context is, I have a WebSocket chat server which provides a trusted certificate from Let's Encrypt through a proxy. However this server also provides an internally managed certificate for identifying it's part of a trusted network. This second certificate is meaningless towards browsers but required for connecting other chat servers to build up a network because the network all trust the root network ca and don't rely on domain names but identities instead.

So in essence, would browsers accept the server since the Let's Encrypt certificate is valid, even though the second certificate is untrusted (since the root ca is not part of the standard trust store).


Only a single site certificate is transferred during a TLS handshake (i.e. at setup of the HTTPS connection). This certificate must be trustable by the browser, i.e. be valid, not expired, signed by a trusted CA and match the domain from the URL. For this specific connection and client it does not matter what kind of certificates the same server might provide to other clients.

Other clients will probably have similar requirements (at least they should). But they might have a different set of trusted CA so that they might accept a certificate which is issued by an internal CA since they trust this internal CA. Or they might trust a specific self-signed certificate.

  • So in essence, I can only send one certificate during the handshake, which means I need to determine which one to send based on who is connected. – dsonck92 Apr 13 '18 at 12:56
  • @dsonck92: yes, you need to distinguish the clients. For example they might use a different port, different subdomain... . Most servers will not support to send a different certificate to a different client based on the clients source IP - but only because this is no common use case and not because it is technically impossible. – Steffen Ullrich Apr 13 '18 at 12:59
  • @dsonck92 Yup. And the TLS protocol extension used to do that when you have multiple certificates is called Server Name Indicator (SNI). – nbering Apr 13 '18 at 12:59
  • @nbering: SNI is used for providing the expected name in the certificate. If there are different certificates for the same domain SNI will not help to distinguish these because all clients will use the same content in the SNI extension. Only if there are different domains (even subdomains) it will help. – Steffen Ullrich Apr 13 '18 at 13:01
  • That can easily be resolved by not using the external domain for the internal network. – nbering Apr 13 '18 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.