How To Create Let's Encrypt Wildcard Certificates with Certbot

Hello there,

I followed this tutorial step by step and everything seems to work fine on the server side.

I run ‘sudo certbot certificates’ and it shows the certificates, but the browsers seems to be taken only the certificate for maindomain and www.maindomain, but no for the wildcard

I don’t know if this could be a problem, but I have created the main and the www with 'certbot –nginx’ and the wildcard with 'sudo certbot certonly \ –dns-digitalocean \ –dns-digitalocean-credentials ~/certbot-creds.ini \ -d *’

I don’t know if there is a way to create only 1 certificate for the main, www and the wildcard in case that’s the problem. I’lll appreciate any leads, thanks in advance.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hey there!

Usually with Letsencrypt you would need to have one certificate that covers your apex domain as well as the wildcards. It sounds like you may currently have 2 certificates which may be the cause of the issue. Using the certonly flag only downloads the certificate and doesn’t configure your webserver to use that certificate. Your webserver is probably still using the first certificate you created with the -nginx flag.

I’d recommend regenerating that certificate but make sure you specify the apex domain in the -d configuration section.

You would then configure your webserver to use the newly created certificate.

Hope it helps! Nate