How to Fix SSL Errors: Step-by-Step Troubleshooting

SSL errors block visitors from reaching your website. This guide diagnoses each error type and provides concrete fixes for expired certs, broken chains, mixed content, and TLS misconfigurations.


An SSL error immediately stops visitors from accessing your website, displaying a scary warning page. Each error type has a specific cause and fix. This guide walks through the most common SSL errors, how to diagnose them, and how to resolve them quickly.

Step 1: Identify the Error Type

Use the ShowDNS SSL Checker to get a full diagnosis, or check the browser's error message:

Browser ErrorLikely Cause
ERR_CERT_DATE_INVALIDCertificate expired or device clock is wrong
ERR_CERT_AUTHORITY_INVALIDUntrusted CA, self-signed cert, or incomplete chain
ERR_CERT_COMMON_NAME_INVALIDHostname does not match certificate's SAN/CN
ERR_SSL_VERSION_OR_CIPHER_MISMATCHTLS version or cipher suite not supported
ERR_CERT_REVOKEDCertificate has been revoked by the CA
Mixed content warningHTTPS page loading resources over HTTP

Fix 1: Expired Certificate (ERR_CERT_DATE_INVALID)

An expired certificate must be renewed. If you are using Let's Encrypt:

bash
# Check when the certificate expires openssl s_client -connect example.com:443 2>/dev/null | openssl x509 -noout -dates # Renew with Certbot immediately sudo certbot renew --force-renewal # Reload the web server sudo systemctl reload nginx # or sudo systemctl reload apache2

For certificates from a paid CA:

  1. Log in to your CA's portal and renew the certificate.
  2. Download the new certificate and fullchain file.
  3. Replace the old certificate files on your server.
  4. Reload the web server.
Prevent future expiryEnable Certbot's automatic renewal and confirm it is working: sudo certbot renew --dry-run. Also add certificate expiry monitoring with the ShowDNS SSL Expiration Checker.

Fix 2: Untrusted Certificate (ERR_CERT_AUTHORITY_INVALID)

This error has three common causes:

Incomplete Certificate Chain

Your server is not sending intermediate certificates. Fix by using the fullchain file:

bash
# Check if intermediate is being served openssl s_client -connect example.com:443 -showcerts 2>/dev/null | grep "Certificate chain" # If only 1 certificate shown, chain is incomplete # Fix for Nginx — use the fullchain file ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # NOT: ssl_certificate /etc/letsencrypt/live/example.com/cert.pem;

Self-Signed Certificate

Replace with a trusted certificate from Let's Encrypt or a paid CA:

bash
# Install Let's Encrypt certificate sudo certbot --nginx -d example.com -d www.example.com

Device's Trust Store Missing the Root CA

On older devices or operating systems, the root CA may not be installed. This is rare with modern CAs. If the certificate works on all other devices but one old device, the device's root store needs updating.

Fix 3: Hostname Mismatch (ERR_CERT_COMMON_NAME_INVALID)

The certificate does not cover the domain being accessed. Check what domains the certificate covers:

bash
# Check certificate SANs openssl s_client -connect example.com:443 2>/dev/null | openssl x509 -noout -text | grep -A2 "Subject Alternative Name" # Should show: DNS:example.com, DNS:www.example.com

Fix by issuing a new certificate that includes the correct domain:

bash
# Issue cert covering both root and www sudo certbot --nginx -d example.com -d www.example.com # For a wildcard cert (covers all subdomains) sudo certbot --nginx -d example.com -d "*.example.com" --preferred-challenges dns

Fix 4: TLS Version/Cipher Mismatch

Your server only supports deprecated TLS versions or cipher suites. Update your server configuration:

nginx
# Nginx — enable only TLS 1.2 and 1.3 ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384; ssl_prefer_server_ciphers off;
apache
# Apache — enable only TLS 1.2 and 1.3 SSLProtocol -all +TLSv1.2 +TLSv1.3 SSLCipherSuite HIGH:!aNULL:!MD5

Fix 5: Mixed Content Warnings

Your HTTPS page is loading resources (images, scripts, styles) over HTTP. Browsers block active mixed content and warn on passive mixed content.

Find all mixed content by opening browser DevTools → Console. Look for warnings like: "Mixed Content: The page was loaded over HTTPS, but requested an insecure resource".

Fix by updating all resource URLs to use HTTPS. Also add this CSP directive to automatically upgrade mixed content:

http
Content-Security-Policy: upgrade-insecure-requests
nginx
add_header Content-Security-Policy "upgrade-insecure-requests" always;

Fix 6: Revoked Certificate (ERR_CERT_REVOKED)

A revoked certificate cannot be un-revoked. You must obtain a new certificate:

  1. Generate a new private key and CSR.
  2. Request a new certificate from your CA.
  3. Install the new certificate on your server.
  4. If you believe the private key was compromised, audit your server for unauthorized access.

Verifying the Fix

After making changes, verify the SSL configuration:

bash
# Full SSL test openssl s_client -connect example.com:443 -showcerts # Check expiry openssl s_client -connect example.com:443 2>/dev/null | openssl x509 -noout -dates # Check TLS version used openssl s_client -connect example.com:443 2>/dev/null | grep "Protocol"

Use the ShowDNS SSL Checker and TLS Checker to confirm the configuration is correct from an external perspective.

Frequently Asked Questions

My SSL certificate is valid but visitors still see an error — why?

Common causes: the certificate chain is incomplete (Chrome may cache the intermediate, but other browsers won't), the wrong certificate file is configured in the web server, or there is a misconfiguration between www and non-www versions. Check with the ShowDNS SSL Checker from outside your network.

How do I fix SSL errors for a specific user only?

If the SSL error only appears for one user, the problem is likely on their device — outdated OS, incorrect system clock, antivirus software intercepting SSL connections, or corporate proxy/firewall modifying HTTPS traffic.

Can I bypass the SSL error temporarily?

In Chrome, you can type thisisunsafe on the error page to proceed to the site. This bypasses the error for that session only and should only be used for testing on your own site. Never advise users to bypass SSL errors.

Related Articles