by marcus_holmes · 8y ago · 0 comments
The problem is that Let's Encrypt doesn't support wildcard certs, so having a single cert for the origin and allowing connections on "www." is not possible. This is a problem because a request on "https://www." will be rejected completely rather than redirected to the origin (or vice versa). In other words, I have to choose one, and the other one won't work at all and can't be redirected (for https, but I'm auto-redirecting from http to https as well, so for everything). Obviously, the marketing gains from not having a "www" outweigh any other considerations at this point, so no "www".
As I understand it, anyway. I could be wrong. I hope I'm wrong, and have just misunderstood how this all hangs together.
Here is an example certbot command:
certbot certonly -n --agree-tos -m example@example.com --webroot -w /var/www/example.com -d 'example.com,www.example.com'
The argument to the `-d` option defines all the subject alternative names.https://github.com/sumdog/bee2/blob/master/dockerfiles/CertB...
They do support wildcard certs now.
unless I'm missing something :)
Here is how I do it using acme.sh:
acme.sh --issue --dns --force --yes-I-know-dns-manual-mode-enough-go-ahead-please -d "${domain}" -d "*.${domain}" > /dev/shm/.le."${domain}".txtI imagine you have to setup your stuff to respond to the DNS + web based challenge/response.
certbot -d example.com www.example.com [other flags here]
That’s from memory, it might be another -d per domain.They do. Since March 2018.