Just now, I was banging my head on the table trying to figure out how to renew or manually reissue a new free SSL certificate for a domain on Cloudflare. TBH, it’s not obvious in the docs.

Just now, I was banging my head on the table trying to figure out how to renew or manually reissue a new free SSL certificate for a domain on Cloudflare. TBH, it’s not obvious in the docs.
Here goes nothing โฆ
Disable Universal SSL]
Enable Universal SSL]
Two ways, really. First, at the top on the same page, in the `Edge Certificates` section, note when the SSL will expire. When you re-enable universal SSL, this area will show pending verification and, in a bit, will show you the new SSL with an expiration date three months from now (or later than the previous SSL expiration date).
Second way? If you’re like me, I have a fancy shell function to check the SSL info of a domain. Looks like this:
# Check SSL info of a domain
ssl() {
if [ -z "$1" ]; then
echo "Usage: ssl <domain>"
return 1
fi
domain=$1
echo | openssl s_client -servername $domain -connect $domain:443 2>/dev/null | openssl x509 -noout -text
}
Now all you have to do is check ssl example.com
and you can find the ‘Not After’ date. Or do a grep with ssl example.com | grep 'Not After'
.
Use your code for good!
Best,
AA
Stay ahead in the web dev community with Ahmad's expert insights on open-source, developer relations, dev-tools, and side-hustles. Insider-email-only-content. Don't miss out - subscirbe for a dose of professional advice and a dash of humor. No spam, pinky-promise!