If you need a wildcard certificate that contains *.domain.example
sites and also work with sub1.sub2.domain.example
or another domain like *.domain2.example
, you can solve that with a single wildcard certificate with what is called a subject alternative name (SAN) extension for each of the other sub sub domains. A SAN cert is not just for multiple specific host names, it can be created for wildcards entries as well.
For example, *.domain.example
, sub1.sub2.domain.example
, and *.domain2.example
would have a Common Name of *.domain.example
then you would attach a subject alternative name of both *.domain2.example
and *.sub2.domain.example
. It might depend on the Certificate Authority as to how they would charge you (or not) for the certificate, but there are some out there where this offering is available. Also, SAN is support is pretty widespread in the web browser space. The best real world example of this use, it Google's SSL cert. Go open Google and view its SSL certificate, you will see it works for *.google.com
, *.youtube.com
, *.gmail.com
, and a bunch more where they are listed as subject alternative names.