Fix SSL certificate errors: "Your connection is not private" and NET::ERR_CERT

"Your connection is not private" means the browser does not trust the site's certificate: expired, for another domain, or untrusted. The end of the message names the cause, and most are fixed with a free Let's Encrypt certificate.

Last updated:

What the error code means

NET::ERR_CERT_DATE_INVALID: the certificate has expired, or the visitor's clock is wrong. Check the date first if only you see it.

NET::ERR_CERT_COMMON_NAME_INVALID: the certificate does not cover this name, such as one for example.com opened at www.example.com. Issue it again for both names.

NET::ERR_CERT_AUTHORITY_INVALID: the certificate is self-signed or missing its intermediate file. Use one from a trusted authority.

ERR_TOO_MANY_REDIRECTS: usually a loop between HTTP and HTTPS, especially with Cloudflare. Set its SSL mode to Full rather than Flexible if your server's certificate works.

Check the current certificate

This shows the certificate's name and its start and end dates as visitors see them.

terminal
$ echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null | openssl x509 -noout -subject -dates

Issue a free certificate on a Linux server

certbot issues a Let's Encrypt certificate, sets up Nginx or Apache, and renews it automatically. The domain must point to your server and port 80 must be open.

console
$ sudo apt-get install certbot python3-certbot-nginx
$ sudo certbot --nginx -d example.com -d www.example.com
$ sudo certbot renew --dry-run

On shared hosting

In cPanel open SSL/TLS Status and use Run AutoSSL. In Plesk open SSL/TLS Certificates for your domain and pick Let's Encrypt. Issuing fails if the domain does not point to the hosting yet.

The padlock is missing though the certificate is fine

This is mixed content: the page is on HTTPS but loads images or files over HTTP. Open developer tools (F12) to find them in Console and change their links to https. In WordPress, change the site address in General Settings to https.

Was this page helpful?