How to Fix Certificate Errors: 'Your Connection Is Not Private'
'Your connection is not private' for beginners, on a real site in a real browser: how to read the code under the warning (NET::ERR_CERT_DATE_INVALID, NET::ERR_CERT_COMMON_NAME_INVALID, NET::ERR_CERT_AUTHORITY_INVALID), the three checks a browser runs on every certificate (name, dates, issuer), which causes are on your side (a wrong clock, a Wi-Fi sign-in page, antivirus) and which only the site's owner can fix (an expired certificate, a missing name, a self-signed certificate), the certbot commands that fix each one on an nginx server, how to keep renewal running, and when clicking Proceed is a real risk.

The warning, and the code under it
Seeing 'Your connection is not private'? The small code under it says what's wrong, who fixes it, and whether clicking through is safe. One site, before and after.

This is Chrome's warning, on a test site. The headline is alarming. It is also the least useful line on the page. Look under it.

The quick fix: read the code
NET, ERR, CERT, DATE INVALID. NET ERR: a network error. CERT: the site's certificate, its ID card. The last part says what's wrong: the date.

So here's the quick fix. If it ends in date invalid, check your own clock first. If that's right, the certificate expired. If it ends in common name invalid, the certificate is for a different address, and only the site can fix that. If it ends in authority invalid, your browser doesn't trust whoever issued the certificate. Usually that's the site's problem. Sometimes it's your network, like hotel Wi-Fi.

The three checks behind it
But why three checks? Picture a guard at a door, checking an ID card. Is the name on the card on the guest list? Is the card still in date? And was it issued by an office the guard trusts? One no, and the door stays shut.
Your browser is that guard. When you open an HTTPS address, the site sends its certificate before any page. The browser checks the name against the address you typed, the dates against your computer's clock, and the issuer against a list it already trusts. An issuer is called a certificate authority, or CA: an organisation that signs certificates. Let's Encrypt is a free one, and its certificates last only ninety days.
Date invalid: an expired certificate
Start with the date check. Here's a tip most people never find: click the code itself, and Chrome opens the certificate's details.

It expired on November twenty-ninth, and today is December second. Your clock is right, so this one is the site's to fix. If it isn't your site, tell its owner, and skip to the chapter on your own clock. But if it is yours: here's the fix, on the server.

Log in to your server. certbot is the tool that got this certificate, and it marks the certificate as expired. curl, a command-line tool that fetches a web address, refuses for the same reason: certificate has expired. Certificates run out on purpose, so a stolen one can't be used for long. Something has to renew them.
sudo certbot certificatesSaving debug log to /var/log/letsencrypt/letsencrypt.log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Found the following certs: Certificate Name: www.mysite.test Serial Number: bb408a93307fa494590697d747a627be Key Type: ECDSA Domains: www.mysite.test Expiry Date: 2026-11-29 12:45:08+00:00 (INVALID: EXPIRED) Certificate Path: /etc/letsencrypt/live/www.mysite.test/fullchain.pem Private Key Path: /etc/letsencrypt/live/www.mysite.test/privkey.pem - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
curl -sSI https://www.mysite.testcurl: (60) SSL certificate problem: certificate has expired More details here: https://curl.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
The fix is one command: sudo certbot renew. sudo runs it as the administrator. In this lab, a practice CA stands in for Let's Encrypt. The command is the same on a real server. It asks the CA for a fresh certificate, proves you control the address, and reloads nginx, the web server. Then ask curl for the certificate's new expiry date: March, next year.
sudo certbot renewSaving debug log to /var/log/letsencrypt/letsencrypt.log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Processing /etc/letsencrypt/renewal/www.mysite.test.conf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Renewing an existing certificate for www.mysite.test Reloading nginx server after certificate renewal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Congratulations, all renewals succeeded: /etc/letsencrypt/live/www.mysite.test/fullchain.pem (success) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
curl -vI https://www.mysite.test 2>&1 | grep 'expire date'* expire date: Mar 2 12:45:15 2027 GMT
Reload the page. No warning. Same address, same server, and a certificate that's in date again.

But why did it expire at all? certbot installs a timer that renews certificates for you, and on this server it was disabled. Turn it back on with systemctl, Ubuntu's tool for background services, and check that it has a next run. Then rehearse a renewal with the dry-run option, so you know the next one will work without you.
systemctl is-enabled certbot.timerdisabled
sudo systemctl enable --now certbot.timerCreated symlink /etc/systemd/system/timers.target.wants/certbot.timer → /usr/lib/systemd/system/certbot.timer.
systemctl list-timers certbot.timerNEXT LEFT LAST PASSED UNIT ACTIVATES Thu 2026-12-03 02:22:50 U… 13h Wed 2026-12-02 12:44:56 UTC - certbot.timer certbot.service 1 timers listed. Pass --all to see loaded but inactive timers, too.
sudo certbot renew --dry-runSaving debug log to /var/log/letsencrypt/letsencrypt.log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Processing /etc/letsencrypt/renewal/www.mysite.test.conf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Simulating renewal of an existing certificate for www.mysite.test - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Congratulations, all simulated renewals succeeded: /etc/letsencrypt/live/www.mysite.test/fullchain.pem (success) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Date invalid: your own clock
Now the same code, from the other side. The site is fixed, and its certificate is good until March. But this laptop's clock is wrong: it says December twenty twenty-three, three years behind. Guess first: will the page load? No. Certificates have a start date as well as an end date, and to this laptop, today comes before the start. So the date check fails.

Chrome's headline changes: Your clock is behind. In your date and time settings, turn on 'set automatically', and reload. The warning is gone.

Common name invalid: a missing name
Second check: the name. Say a visitor types your address without the www. The warning is back, ending in common name invalid.

Click the Advanced button, and Chrome spells it out: this certificate is from www.mysite.test, not mysite.test. To a browser, those are two different names. curl agrees: none of the names on the certificate match.
On the server, certbot shows the cause: one name under Domains, the www one. A certificate only covers the names written inside it. So ask certbot for one that lists both. The expand option adds the new name to the certificate you already have, and you put a dash D before each name. The nginx option installs it for you. Now Domains lists both names.
sudo certbot certificatesSaving debug log to /var/log/letsencrypt/letsencrypt.log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Found the following certs: Certificate Name: www.mysite.test Serial Number: e6aab4413e6f3e1891fdcc4543950841 Key Type: ECDSA Domains: www.mysite.test Expiry Date: 2027-03-02 12:45:15+00:00 (VALID: 89 days) Certificate Path: /etc/letsencrypt/live/www.mysite.test/fullchain.pem Private Key Path: /etc/letsencrypt/live/www.mysite.test/privkey.pem - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sudo certbot --nginx --expand -d www.mysite.test -d mysite.testSaving debug log to /var/log/letsencrypt/letsencrypt.log Renewing an existing certificate for www.mysite.test and mysite.test Successfully received certificate. Certificate is saved at: /etc/letsencrypt/live/www.mysite.test/fullchain.pem Key is saved at: /etc/letsencrypt/live/www.mysite.test/privkey.pem This certificate expires on 2027-03-02. These files will be updated when the certificate renews. Deploying certificate Successfully deployed certificate for www.mysite.test to /etc/nginx/sites-enabled/mysite.conf Successfully deployed certificate for mysite.test to /etc/nginx/sites-enabled/mysite.conf Your existing certificate has been successfully renewed, and the new certificate has been installed. NEXT STEPS: - The certificate will need to be renewed before it expires. Certbot can automatically renew the certificate in the background, but you may need to take steps to enable that functionality. See https://certbot.org/renewal-setup for instructions. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - If you like Certbot, please consider supporting our work by: * Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate * Donating to EFF: https://eff.org/donate-le - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sudo certbot certificatesSaving debug log to /var/log/letsencrypt/letsencrypt.log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Found the following certs: Certificate Name: www.mysite.test Serial Number: 8d9720b731fc1812302b797891b99191 Key Type: ECDSA Domains: mysite.test www.mysite.test Expiry Date: 2027-03-02 12:46:10+00:00 (VALID: 89 days) Certificate Path: /etc/letsencrypt/live/www.mysite.test/fullchain.pem Private Key Path: /etc/letsencrypt/live/www.mysite.test/privkey.pem - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The address without www loads. If your site answers on several names, every one of them has to be on the certificate.

Authority invalid: a self-signed certificate
Third check: the issuer. This is staging: a copy of your site where you test changes. The ending this time: authority invalid.

Under Advanced, Chrome says its security certificate is not trusted by your computer's operating system. So which certificate is staging actually using? nginx's settings tell us: a file called snakeoil. Odd name. Here's what it is.
Snakeoil is a certificate that Ubuntu makes on the server itself, for testing. Ask openssl, a tool that reads certificates, who it belongs to, and who issued it. Subject: web01, this server's own name. Issuer: web01. It signed itself. Anyone can make a certificate like that, for any name, so no browser trusts a self-signed one by default.
grep -n ssl_certificate /etc/nginx/sites-available/staging.conf5: ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem; 6: ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
openssl x509 -in /etc/ssl/certs/ssl-cert-snakeoil.pem -noout -subject -issuersubject=CN = web01 issuer=CN = web01
For your staging site, the real fix is the same tool: certbot, with the staging name. The nginx option lets it update nginx's settings too. It swaps the self-signed file for a certificate from a CA your browser trusts. Ask curl again, and the issuer line now names the CA, not the server itself.
sudo certbot --nginx -d staging.mysite.testSaving debug log to /var/log/letsencrypt/letsencrypt.log Requesting a certificate for staging.mysite.test Successfully received certificate. Certificate is saved at: /etc/letsencrypt/live/staging.mysite.test/fullchain.pem Key is saved at: /etc/letsencrypt/live/staging.mysite.test/privkey.pem This certificate expires on 2027-03-02. These files will be updated when the certificate renews. Deploying certificate Successfully deployed certificate for staging.mysite.test to /etc/nginx/sites-enabled/staging.conf Congratulations! You have successfully enabled HTTPS on https://staging.mysite.test NEXT STEPS: - The certificate will need to be renewed before it expires. Certbot can automatically renew the certificate in the background, but you may need to take steps to enable that functionality. See https://certbot.org/renewal-setup for instructions. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - If you like Certbot, please consider supporting our work by: * Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate * Donating to EFF: https://eff.org/donate-le - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
curl -vI https://staging.mysite.test 2>&1 | grep -E 'issuer|expire date'* expire date: Mar 2 12:46:25 2027 GMT * issuer: O=Practice CA; CN=Practice CA Intermediate CA
And staging loads, with no warning to click through.

Is it safe to click Proceed?
Back to the question from the start. Under Advanced, Chrome offers a link: Proceed, unsafe. To see what it does, we went back to staging before the fix, and ran curl with dash K, which skips the checks, just like Proceed. Guess first: is that connection still encrypted? Yes. The connection uses TLS 1.3, the encryption behind HTTPS. And the page arrives with two hundred OK, the normal answer. The encryption works. What you've lost is knowing who is on the other end.
curl -skv https://staging.mysite.test 2>&1 | grep -E 'SSL connection|issuer:|HTTP/'* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / X25519 / RSASSA-PSS * issuer: CN=web01 * using HTTP/1.x > GET / HTTP/1.1 < HTTP/1.1 200 OK
On a machine you control, like this staging server on your own network, clicking through is a small risk. On public Wi-Fi, the same warning can mean someone sits between you and the site, hands your browser their own certificate, and reads everything you type. So never click through on a site where you sign in or pay.

And if every site warns you at once, the problem is on your side. Check your clock first. On hotel or café Wi-Fi, the network grabs your connections until you sign in, so finish its sign-in page first. Still getting warnings? Your antivirus may be scanning HTTPS by swapping in its own certificate. Turn that setting off.

Recap
So: read the code. Date invalid: your clock, or an expired certificate. Common name invalid: put every name on the certificate. Authority invalid: get one from a trusted CA. And never click through where you sign in or pay.

If you can now read that warning instead of fearing it, subscribe, and the next confusing error message might be one we've already taken apart.
The lab files and every command are linked in the description, so you can break and fix all three yourself. Thanks for watching Cloud Explainers.
Sources
Demos: containers on our own Mac standing in for your server and your laptop; mysite.test is a made-up test address. A practice certificate authority (step-ca) stands in for Let's Encrypt, so the certbot commands are the real ones. Every page, command, output and date was real. Watch the full video on YouTube.