Does LE support wildcard certificates?
As a prerequisite I understand that I need a specially crafted zone file to allow this.
$ORIGIN mydomain.org.
$TTL 86400
; SOA Records
@ IN SOA ns1.first-ns.de. dns.hetzner.com. 2023060606 14400 1800 604800 86400
; NS Records
@ IN NS ns1.first-ns.de.
@ IN NS robotns2.second-ns.de.
@ IN NS robotns3.second-ns.com.
; MX Records
@ IN MX 10 mail
; A Records
@ IN A 123.203.111.43
localhost IN A 127.0.0.1
mail IN A 123.203.111.43
www IN A 123.203.111.43
; CNAME Records
cms IN CNAME www
ftp IN CNAME www
imap IN CNAME www
loopback IN CNAME localhost
msg IN CNAME www
pop IN CNAME www
relay IN CNAME www
smtp IN CNAME www
; TXT Records
@ IN TXT "v=spf1 mx ip4:123.203.111.43 ~all"
How would this zone file have to be modified to support wildcard domains?
Do I have to specify any host that I'm about to support or can I just rely that
an arbitrary hostname like
If your question is how to configure a zone with a wildcard record, you should ask this in another forum, like Server Fault.
For creating a wildcard certificate, it's doesn't really matter how your zone looks. You can use a plugin like certbot-dns-hetzner or certbot-dns-multi to create the certificate (assuming Hetzner is your domain's DNS host).
For creating a wildcard certificate, it's doesn't really matter how your zone looks. You can use a plugin like certbot-dns-hetzner or certbot-dns-multi to create the certificate (assuming Hetzner is your domain's DNS host).
When I already have a multi domain LE cert containing some distinct domain names plus a bunch of other domainnames, like
You don't have to delete your old certificates, at least not until you've created a new one and tested that it works.
But yes, you can mix and match any combination of wildcards and non-wildcards across different domains on a single certificate (as long as they are not redundant, i.e. you can't have imap.mydomain.org and *.mydomain.org on the same certificate, because the former is made redundant by the latter).
In short: Yes; You can "merge" the names onto a new cert.
[staying within the 100 SAN entry limit]
Automating it may be complicated - if the ACME client isn't able to combine different challenge types in the same order OR if more than one wildcard is used and they require distinct DNS plugins.
That said, you might be able to do the whole validation manually - but that is not recommended.
So, in each case, it depends on the ACME client/version and the DSPs in use.