DEV Community

Discussion on: Let’s Encrypt SSL certificate in Namecheap AutoRenewal – Verified & working – Using ACME.sh

Collapse
 
daveelton profile image
Dave Elton • Edited

The redirect method for www. has a snag. Most browsers seem to look for a www.mydomain.com cert before following the redirect. This results in users seeing a warning and not redirecting.

The solution is to add a second domain arg to each of the commands. EG:

acme.sh --issue --webroot ~/public_html -d mydomain.com -d www.mydomain.com --staging

acme.sh --issue --webroot ~/public_html -d mydomain.com -d www.mydomain.com --force

acme.sh --deploy --deploy-hook cpanel_uapi --domain mydomain.com --domain www.mydomain.com
Enter fullscreen mode Exit fullscreen mode

You'll still want to add the redirect, but this will now avoid the error for users.