SSL Certificate expired, site not opening

  • Post author:
  • Post last modified:August 16, 2023
  • Reading time:2 mins read

1.0 ERROR

A website stopped opening in browser, giving the error that the SSL certificate was either invalid or had expired.

2. SOLUTION

Checking the website with wget,

$ wget https://www.example.com
--2018-01-14 16:58:36--  https://www.example.com/
Resolving www.example.com (www.example.com)... 198.51.100.12, 2001:db8:1221:2341:f03c:f27b:12fa:2123
Connecting to www.example.com (www.example.com)|198.51.100.12|:443... connected.ERROR: cannot verify www.example.com's certificate, issued by ‘CN=Typical Encryption Authority X3,O=Typical Encryption,C=XX’:
  Issued certificate has expired.
To connect to www.example.com insecurely, use `--no-check-certificate'.
$
$ wget --no-check-certificate https://www.example.com
--2018-01-14 16:59:09--  https://www.example.com/
Resolving www.example.com (www.example.com)... 198.51.100.12, 2001:db8:1221:2341:f03c:f27b:12fa:2123
Connecting to www.example.com (www.example.com)|198.51.100.12|:443... connected.
WARNING: cannot verify www.example.com's certificate, issued by ‘CN=Typical Encryption Authority X3,O=Typical Encryption,C=XX’:
  Issued certificate has expired.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html.1’

index.html.1            [ <=>                ]  36.38K  --.-KB/s    in 0s      

However, when we checked the website files, the certificate was was actually renewed by the background automatic renew system. But somehow, the renewed certificate was not being used by the web server.

The problem was solved by clearing the pagespeed cache.

$ sudo systemctl stop nginx
$ cd /var/ngx_pagespeed_cache
$ sudo rm -r *
$ cd
$ sudo systemctl start nginx
Share

Karunesh Johri

Software developer, working with C and Linux.