webzod
account

Fix a certificate that is not valid yet

tls.cert.not_yet_valid · effort: minutes

Why it matters

Browsers reject a certificate before its start date and show a full-page security warning. This is usually a certificate created on a machine whose clock was ahead (self-signed or internal CA), or a certificate for a later switch that was installed early.

The fix

  1. Check the clock of the machine that created the certificate. If it was set to a future date, the certificate carries that date as its start. For a public-CA certificate, also check that the installed file is the one you expect, since an old or wrongly named file is another common cause.
  2. Fix the clock and enable time synchronisation (NTP) so it stays right.
  3. Request a fresh certificate from your CA or ACME client once the clock is correct, install it and reload the web server.
  4. If the date is wrong on purpose (a certificate issued ahead of a planned switch), install the currently valid certificate until the new one starts.
  5. Confirm the start and end dates with the command below.
bash
date -u
timedatectl set-ntp true
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -dates

The examples use example.com. Replace it with your own domain.

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.