3 - Manually Extending SSL to WWW

Usually CyberPanel will automatically issue Let’s encrypt SSL cert for both www and non-www version of domains, but if in rare case it failed to issue WWW cert , you can extend the SSL for www domain manually.

1. Run command (change example.com to your domain for ALL steps)

certbot certonly --webroot -w /home/example.com/public\_html -d example.com -d www.example.com

and enter E during operation

2. Now new cert is issued successfully, we need to replace them with existing ones.

ls -ln /etc/letsencrypt/live/example.com

and finally restart LiteSpeed Web Server.

systemctl restart lsws

Hi,

I ran the command to extend the certificate as described above but it failed with the following message:

Invalid response from http://www.leecorpweb.com/.well-known/a
cme-challenge/zam_Z31zaETUVcYb1VjnBqLrnLCPtlLNfJ00y85awjY: 404

Hint: The Certificate Authority failed to download the temporary challenge files created
by Certbot. Ensure that the listed domains serve their content from the provided --webr
oot-path/-w and that files created there can be downloaded from the internet.

I installed the certificate using the panel and it did not create the .well–known folder in the root directory. I fact, I don’t know where the .well-known folder is created by the script used by CyberPanel.

Question: How can I edit the CyberPanel script so that it requests certs for the domain name and the www alias; or, how can I create a www alias that displays in the list of sites for which to request a certificate? I notice that the mail.leecorpweb.com alias was somehow created without my expressly creating it.

This SSL issue is really messing up my site as https://leecorpweb.com is accepted as secure but https://www.leecorpweb.com is treated as insecure and dangerous by Chrome on desktop and Android; Firefox on desktop as well as Dolphin on Android. Firefox on Android will not allow access to the site at all although the others will allow entry with a warning.

It is a WordPress site and I have temporarily addressed the matter by setting the site url as https://leecorpweb.com, without the www.