This question may have come to your mind, how to check your domain’s SSL certification has expired or not? Here you will get your answer.

Introduction: Knowing how to quickly check the dates that your certificate is valid for, can allow you to quickly determine if the issue you are experiencing is related to an expired certificate.

Procedure: openssl is the best tool for this. Openssl’s Command-line tool offers a plethora of options that allow you to read the certificate data and return the information you want.

For this, we need the start and end date, that the certificate will be valid.

To get this information you need to follow the command and replace DOMAIN and $PORT with the right information. For this port, it will generally be 443 for the webserver, still, if you want to check the certificate for a different server, be sure to use the right port number. 

echo Q|openssl s_client -connect $DOMAIN:$PORT -servername $DOMAIN -showcerts|openssl x509 -noout -dates

An example of the output returned will look like this; providing you with the issuer of the certificate and the date ranges that the certificate is valid for.

[[email protected] ~]$ echo Q|openssl s_client -connect -servername -showcerts|openssl x509 -noout -dates
depth=2 C = GB, ST = Greater Manchester, L = Salford, O = COMODO CA Limited, CN = COMODO RSA Certification Authority
verify return:1
depth=1 C = GB, ST = Greater Manchester, L = Salford, O = COMODO CA Limited, CN = COMODO RSA Domain Validation Secure Server CA
verify return:1
depth=0 OU = Domain Control Validated, OU = PositiveSSL Wildcard, CN = *
verify return:1
notBefore=Dec 22 00:00:00 2018 GMT
notAfter=Jan 20 23:59:59 2021 GMT

If you find any difficulty with this, please feel free to get in touch with us via. Live chat or email.

Read Also : How to install an SSL Certificate on a Domain