A wildcard certificate covers every first-level subdomain of a domain: *.example.uz works for shop.example.uz, api.example.uz and blog.example.uz at once. That suits projects with many subdomains, SaaS products that give each customer a subdomain, and systems that spin up new names often. Let's Encrypt issues wildcards for free, with one condition: domain control must be proven with DNS-01.
Why DNS-01
Regular certificates often use HTTP-01, where the CA fetches a file from your site. That can't work for a wildcard, since *.example.uz may cover endless names that don't all point to one server. Instead the CA checks that you control the DNS zone: you publish a TXT record at _acme-challenge.example.uz and the CA reads it.
Note that a wildcard covers exactly one level and not the apex. *.example.uz is invalid for both example.uz and a.b.example.uz, so requests usually include both example.uz and *.example.uz. That produces two different TXT values on the same _acme-challenge name, and both must exist at the same time.
Manual issuance: good for learning, not for production
sudo certbot certonly --manual --preferred-challenges dns \
-d example.uz -d '*.example.uz'
dig TXT _acme-challenge.example.uz +short @8.8.8.8
A low TTL on the TXT record speeds things up. The real problem is that a --manual certificate won't renew, because Certbot can't add the record itself. After 90 days it expires and the site breaks, so automate it.
Three ways to automate
1. Your DNS provider's API
If your DNS host has an API, the ACME client adds and removes the TXT record itself. acme.sh supports well over a hundred DNS services, and Certbot has plugins too.
export CF_Token="token-with-dns-edit-only"
acme.sh --issue --dns dns_cf -d example.uz -d '*.example.uz'
acme.sh --install-cert -d example.uz \
--key-file /etc/ssl/example.uz.key \
--fullchain-file /etc/ssl/example.uz.crt \
--reloadcmd "systemctl reload nginx"
Scope the token to editing a single zone. A full-account key on a server means a breach could hand an attacker the DNS of all your domains.
2. CNAME delegation
If your DNS host lacks an API, or you'd rather not give the server broad access, point _acme-challenge.example.uz once via CNAME to a name in another zone that does have an API. The CA follows the CNAME and reads the TXT there, so your main zone stays untouched. The acme-dns project, a tiny DNS server just for ACME records, works the same way.
_acme-challenge.example.uz. CNAME _acme-challenge.acme.misol.uz.
acme.sh --issue --dns dns_cf -d example.uz -d '*.example.uz' \
--challenge-alias acme.misol.uz
3. Running your own authoritative DNS
Larger setups sometimes run BIND or PowerDNS and let the ACME client add records through RFC 2136 dynamic updates. You gain full control but also full responsibility for running and backing up DNS.
Example: a menu service with subdomains for every cafe
A Tashkent startup offers online menus where each cafe gets kafe-nomi.misol.uz. Issuing a separate certificate for every new cafe became unmanageable, so the team switched to one *.misol.uz certificate, delegated _acme-challenge via CNAME to a helper zone with an API, and runs acme.sh from cron. New cafes need no certificate work, and renewal happens every 60 days on its own. If your domain is registered through sayt.uz, add the CNAME or TXT records in the DNS section of the sayt.uz cabinet, and ask support about API automation options.
Common mistakes
- Not waiting for propagation. acme.sh's
--dnssleepsets the delay before validation. - A blocking CAA record that doesn't permit Let's Encrypt.
- Forgetting the apex, so
example.uzitself shows an error. - Leftover TXT records from manual attempts that clutter the zone.
openssl x509 -in /etc/ssl/example.uz.crt -noout -ext subjectAltName
The SAN list should show both the apex and the wildcard name.