When trying to open a https site on my server, for which I bought a SSL-certificate, I get a NET::ERR_CERT_DATE_INVALID error in chrome.

What do I have to do on my ubuntu server to fix this?

This is a headless server, I only have console access, so no gui approaches please.

2 Answers 2


Similar problems happened on my laptop (with Ubuntu 18.04 LTS) that wasn't turned on for quite a while. The system time gets wonky and is at least 18hrs off.

Everything else works fine but the issue raised when Google Chrome refuse to open any webpage.

This seems to fix the issue by correcting the system time.

sudo apt install ntp
timedatectl set-ntp true

See Enable System clock synchronization for other alternative fix.


One of two things has happened.

  1. Your certificate has expired
  2. The system time is wrong
  • date gives Mi 28. Okt 05:32:19 CET 2015 - How to check for the expiry date? EDIT: I found echo | openssl s_client -connect mydomain.com:443 2>/dev/null | openssl x509 -noout -dates. How do I prolong it? Oct 28, 2015 at 4:33
  • Does that command indicate that the cert is expired? Oct 28, 2015 at 4:39
  • notBefore=Sep 15 15:59:50 2012 GMT; notAfter=Sep 15 15:59:50 2013 GMT; was the result Oct 28, 2015 at 4:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.