Let’s Encrypt certificate to cover both wildcard subdomains and root-domain

lets-encryptsubdomainwildcard-subdomain

I'm running a server under example.com domain and I have sub-domains like:

  • a.example.com
  • b.example.com

I'm creating certificate from Let's Encrypt with zerossl online tools and I have an issue. When I generate the certificate using wildcards as *.example.com and apply it on the server all the sub-domains are good and the root-domain with www. prefix is good too.

The Only glitch is about https://example.com since it isn't included in the wildcard pattern (*.example.com).

In some other posts like this there are suggestions to use *.example.com/CN=mexample.com but the zerossl online tools doesn't support "/" character in it's web page.

Is there any workaround to pass this issue?

Best Answer

You need to use SAN and create a certificate that’s good for both *.example.com and example.com. There’s help on doing so here. See also the zerossl FAQ, which says:

If you want a so-called "naked" domain ("domain.ext") covered along with the wildcard ("*.domain.ext"), then put both those names into appropriate field, separated with a space or a comma