SSL Certificate not working for non-www domain


#1

Hi

I am using Nginx
I have generate a wildcard ssl certificate ie *.example.com
bu using this command
./certbot-auto certonly --server https://acme-v02.api.letsencrypt.org/directory --manual --preferred-challenges dns -d *.example.com

But this certificate is only working for www.example.com and doesn’t working for example.com

so is there any way to use this certificate for both www & non-www.

Please let me know how to fix this

Regards
Ankit Gupta


#2

Yes, that’s exactly correct. *.example.com will cover subdomains of example.com, but not example.com itself–as a very cursory search would have revealed. If you want to cover example.com on the same cert, you’ll need to issue a new cert covering both *.example.com and example.com.


#3

ok
but please tell how to do that.


#4

Similar command to what you used before:

./certbot-auto certonly --server https://acme-v02.api.letsencrypt.org/directory --manual --preferred-challenges dns -d example.com -d "*.example.com"


#5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.