An SSL certificate error looks alarming because the browser makes it look like an attack. Usually it is a maintenance problem: a certificate expired, a renewal was installed on one server but not another, or a domain was added without updating the certificate’s names.
The important part is to identify which link failed. An expired certificate, a hostname mismatch, an untrusted issuer and a mixed-content warning all look similar in a screenshot but have different fixes. Changing the wrong one wastes time and can take a working site offline.
Read the error before changing anything
Open the site in a private window and expand the warning details. The browser’s wording is usually specific enough to classify the problem:
| Browser message | Likely cause |
|---|---|
ERR_CERT_DATE_INVALID |
Expired certificate, or wrong date on the device |
ERR_CERT_COMMON_NAME_INVALID |
Certificate does not cover the hostname |
ERR_CERT_AUTHORITY_INVALID |
Untrusted or self-signed issuer, or missing intermediate |
ERR_CERT_REVOKED |
Certificate was revoked by the issuer |
ERR_SSL_PROTOCOL_ERROR |
TLS handshake failure, often server configuration |
| “Not secure” with a working padlock | Mixed content or an insecure form action |
Step 1: Check the certificate from the outside
Use a command-line check or an external certificate tester. Both show the certificate the server actually sends, which is more reliable than a browser that may have cached an old one.
Inspect the live certificate
-
Open a terminal and run:
openssl s_client -connect butfix.com:443 -servername butfix.com </dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -dates -ext subjectAltName -
Read the output:
notBeforeandnotAftershow the validity window.subjectAltNamelists the hostnames the certificate covers.issuershows the certificate authority.
-
Compare the hostname in the address bar with the names in
subjectAltName.www.example.comandexample.comare different names unless both are listed. -
If the dates are in the past, the certificate is expired. If the names do not match, it is the wrong certificate for this host.
On Windows PowerShell, curl.exe -vI https://example.com shows the TLS handshake and certificate subject. An external SSL checker is also useful because it tests the chain from a different network.
If the certificate is valid and correctly named when tested externally, the problem is probably local to the visitor: a wrong system clock, a cached certificate, or a corporate proxy that replaces certificates. Check the device date and time before touching the server.
Step 2: Fix a wrong device clock
Certificate validation depends on the current time. A laptop that wakes with a date in 2019 will reject every valid certificate it sees.
Correct the date, time and time zone
- On Windows, open Settings > Time & language > Date & time and enable Set time automatically.
- On macOS, open System Settings > General > Date & Time and enable Set time and date automatically.
- On iPhone or Android, open the date and time settings and enable automatic time.
- Restart the browser and reload the site.
If the clock resets again after a reboot, the CMOS battery on a desktop may need replacing. On a managed device, a corporate policy may be forcing the wrong time zone.
Step 3: Renew or reissue the certificate
If the certificate is genuinely expired or does not cover the hostname, fix it at the source. The exact steps depend on the host, but the sequence is consistent.
Renew and install a certificate on the server
- Log in to the hosting control panel or the certificate authority account.
- Check which domains the current certificate covers. Add any missing
www, subdomain or alternate name before renewing. - Issue the renewal. With Let’s Encrypt and AutoSSL, this may be automatic; with a commercial certificate, you may need to complete domain validation again.
- Install the new certificate and private key on the web server or load balancer.
- Reload the web server. On Apache or Nginx this is usually a graceful reload; a full restart is rarely necessary.
- If a CDN or reverse proxy sits in front of the site, upload the certificate there as well and confirm the proxy is in full-strict mode, not flexible mode.
After the reload, rerun the inspection command and confirm the new dates and names. Then test in a private window and from a second network.
Do not install a certificate on only one node of a load-balanced site. The other node will keep serving the old certificate, and visitors will see the warning intermittently depending on which server answered.
Step 4: Install the intermediate certificate chain
A certificate can be valid, correctly named and still untrusted because the server sends only the leaf certificate. Browsers need the intermediate certificate to build a chain back to a trusted root.
Symptoms include ERR_CERT_AUTHORITY_INVALID on some devices but not others, or a warning in older Android versions while desktop Chrome is fine.
Serve the full certificate chain
- Download the intermediate certificate from your certificate authority. It is usually a
.crtor.ca-bundlefile, not the private key. - Build the chain file in this order: your certificate first, then the intermediate certificate. Some hosts call this
fullchain.pem. - Update the web server configuration to use the chain file for
SSLCertificateFileorssl_certificate. - Reload the web server.
- Recheck with an SSL tester that the chain is complete and no intermediate is missing.
Do not include the root certificate in the chain file. Browsers already trust the root, and adding it can cause validation problems on some clients.
Step 5: Fix mixed content
A page can have a valid certificate and still show “Not secure” because it loads an image, script or form over plain HTTP. The padlock may look fine until you open the console.
Find and replace insecure resource URLs
- Open the browser developer tools and reload the page.
- Look for mixed-content warnings in the Console and Security panels.
- Search the site for
http://references to your own domain, especially in templates, widgets, sliders and email forms. - Replace them with
https://or root-relative paths such as/images/photo.jpg. - If a third-party embed does not support HTTPS, remove it or replace it with a provider that does.
- Clear the site cache and reload.
WordPress sites often retain old HTTP URLs in the database after a migration. A search-and-replace tool can update them, but back up the database first and test the result.
Step 6: Check proxy and CDN SSL modes
If the site uses Cloudflare or another reverse proxy, there are two TLS connections: visitor to proxy, and proxy to origin. The browser only sees the first one. A valid edge certificate can hide a broken origin connection, or a strict origin setting can produce a 526 or 525 error.
- Flexible mode connects to the origin over HTTP. It can cause redirect loops and makes the origin connection unencrypted. Use Full (strict) when the origin has a valid certificate.
- Full (strict) requires the origin certificate to be valid and trusted by the proxy. A self-signed origin certificate will fail.
- Always Use HTTPS should be enabled only after the origin and all subdomains work over HTTPS.
- Purge the proxy cache after replacing a certificate so edge nodes stop serving the old chain.
Check whether the fix worked
- Run the external certificate check again and confirm the new expiry date and hostname list.
- Open the site in a private window and confirm the padlock is present with no warning.
- Check the browser console for mixed-content errors.
- Test from a phone on mobile data, not just the same Wi-Fi network.
- If the site has a CDN, test a URL with a cache-busting query string and check the proxy’s certificate status.
- Use an SSL test that reports chain issues, not just the expiration date.
Prevent it from happening again
- Enable automatic renewal. Let’s Encrypt certificates are short-lived; manual renewal is easy to forget.
- Monitor expiry 30 days ahead. Set a calendar reminder or use the host’s expiration alerts.
- Include every hostname. Add
www, staging names and subdomains before they are needed. - Renew before changing DNS. A certificate validation that depends on a DNS record can fail during a migration.
- Keep the chain file with the certificate. Store both in the same deployment process.
- Test after every proxy change. A CDN SSL mode change can break the origin without affecting the edge.