Test SSL Configuration with OpenSSL
Test SSL configuration with OpenSSL by asking the server what it actually presents, not what the control panel claims. One command shows the chain, the negotiated protocol and the cipher. A few more confirm the dates, the hostnames on the certificate and whether the key on disk matches. Every command below is copy and paste.
Test SSL configuration with one OpenSSL command
openssl s_client -connect example.com:443 -servername example.com -showcerts
The -servername flag sends SNI, which matters on any server hosting multiple sites; without it you may test the wrong certificate. Read the output for three things: the certificate chain in order, the line Verify return code: 0 (ok), and the negotiated protocol and cipher near the end.
Test SSL configuration with OpenSSL: dates and hostname
echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null \
| openssl x509 -noout -dates -subject -issuer -ext subjectAltName
This prints the exact validity window, who issued the certificate, and every hostname it covers. A certificate that covers example.com but not www.example.com shows up here instantly. For a quicker external view, the SSL Checker shows the same details without a terminal.
Test TLS versions and ciphers
Confirm the server accepts modern TLS and rejects the old versions:
openssl s_client -connect example.com:443 -tls1_3
openssl s_client -connect example.com:443 -tls1_2
openssl s_client -connect example.com:443 -tls1_1
The first two should complete a handshake; TLS 1.1 and older should fail. If an ancient version still connects, tighten the server config. While you are there, confirm HSTS and related headers with the Security Headers Checker.
Verify files on disk match
When a certificate will not install, the usual cause is a key that does not match the certificate. Compare their fingerprints:
openssl x509 -noout -modulus -in certificate.crt | openssl md5
openssl rsa -noout -modulus -in privkey.pem | openssl md5
Identical hashes mean the pair matches. The modulus trick works for RSA keys; with an ECDSA key, compare the public key of both files instead. Check the chain file locally too:
openssl verify -CAfile ca-bundle.crt certificate.crt
A quick reference
| Question | Command |
|---|---|
| What chain does the server send? | s_client -connect host:443 -servername host -showcerts |
| When does the certificate expire? | ... | openssl x509 -noout -dates |
| Which hostnames are covered? | ... | openssl x509 -noout -ext subjectAltName |
| Does TLS 1.3 work? | s_client -connect host:443 -tls1_3 |
| Do cert and key match? | Compare -modulus | openssl md5 of both files |
| Is the chain complete? | openssl verify -CAfile ca-bundle.crt cert.crt |
Related reading: preventing misconfiguration and fixing AutoSSL errors.
Frequently Asked Questions
Why does Verify return code show a failure when the site works in my browser?
Your desktop trusts intermediates it has cached or can fetch. OpenSSL only uses what you give it, so it exposes missing intermediates honestly. Serve the full chain and the error disappears.
What does -servername actually change?
It sends the SNI extension, telling the server which site's certificate you want. On shared hosting or behind HAProxy with many certificates, omitting it gets you the default certificate instead of yours.
Can I test a certificate before DNS points at the new server?
Yes. Add -connect SERVER-IP:443 -servername example.com so you connect by IP while asking for the right hostname. This is the standard pre-migration check.
Is OpenSSL on Windows usable for this?
Yes. OpenSSL ships with Git for Windows and is available in package managers, and every command above works the same in its shell.
Why does Verify return code show a failure when the site works in my browser?
Your desktop trusts intermediates it has cached or can fetch. OpenSSL only uses what you give it, so it exposes missing intermediates honestly. Serve the full chain and the error disappears.
What does -servername actually change?
It sends the SNI extension, telling the server which site's certificate you want. On shared hosting or behind HAProxy with many certificates, omitting it gets you the default certificate instead of yours.
Can I test a certificate before DNS points at the new server?
Yes. Add -connect SERVER-IP:443 -servername example.com so you connect by IP while asking for the right hostname. This is the standard pre-migration check.
Is OpenSSL on Windows usable for this?
Yes. OpenSSL ships with Git for Windows and is available in package managers, and every command above works the same in its shell.
How often should I run these checks?
After every certificate renewal, every server upgrade and any change to a proxy or CDN. Once a quarter is a sensible minimum.
✅ Post-Installation Verification & SEO Checklist
After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:
- Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
- Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
- Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
- Confirm both root and
wwwversions resolve cleanly to one canonical HTTPS URL. - Verify your HTTPS property and
sitemap.xmlinside Google Search Console and Bing Webmaster Tools.