SSL Certificate Still Appears as Expired: Troubleshooting Guide

ssl

My ssl certificate has expired and I generated a new one with the same private key. After I uploaded my new certificate on the server, chrome and other browsers still view the old one. Deleted cache and everything, tried in an incognito window, restarted the express js server. Could it be because I used the same private key?

Best Answer

Deleted cache and everything, tried in an incognito window, restarted the express js server.

Browsers don't cache the server certificate. They might reuse an existing TLS session and not get the new certificate though. But this is only done if the handshake for this connection succeeded, i.e. certificate was valid or the invalid certificate was explicitly accepted. If the browser still complains about the certificate as expired after reloading the page, then the server is still providing the old expired certificate.

Could it be because I used the same private key?

No, it does not matter that the same private key is used.

Make sure that you a) really replaced the old certificate with the new one and b) replaced it on the correct server, i.e. the one which is actually terminating the TLS connection from the client. Depending on your configuration this might be the express js server itself or some reverse proxy or WAF in front of it.