TRENDING
A mountain gorilla looks at the camera from green forest undergrowth
October 29, 2026
How to Compress Time-Series Metrics in Python With Gorilla Delta-of-Delta and XOR Encoding
A bronze-framed hourglass with white sand beside a small Ferris wheel ornament on a wooden table against a teal wall
October 29, 2026
NIST’s Final Post-Quantum Transition Report Puts Every Quantum-Vulnerable Public-Key Scheme on One 2030 and 2035 Clock, and Three Federal Documents Word the Deadline Three Ways
Six weathered stone columns of the Temple of Apollo at Delphi, Greece, standing on a stone platform above a valley of olive groves
October 29, 2026
Honeypots Recorded Probes Against Oracle E-Business Suite CVE-2026-101767 Seven Days After Its Patch, and the Finder’s Write-Up Is Dated Patch Day
Vintage silver stopwatch with a chain on a black background, its dial showing seconds from 5 to 60
October 29, 2026
How to Find a Slow Query in PostgreSQL 18 With pg_stat_statements, Read Its EXPLAIN ANALYZE Plan, and Fix It With the Right Index
A wooden Tower of Hanoi puzzle on a market table, with three pegs and stacked discs of different sizes
October 29, 2026
Two Labs’ Claimed Refutations of the Exponential Time Hypothesis Turn Verification Into a Statement-Reading Problem, and Their Lean Theorems Promise Only That a Constant Exists
29 Oct 2026
SXZ.io SXZ.io
  • Home
Search the Site
Popular Searches:
Technology Amazon AI
Recent Posts
A flock of snow geese in flight, seen as dark silhouettes against an orange and red sunset sky with layered clouds
How to Run Zero-Downtime Schema Migrations on PostgreSQL 18 and Block Unsafe ALTER TABLE Statements With a Python Lint Gate
October 28, 2026
An old green steel truss bridge resting on temporary supports beside a new arch bridge under completion on a river in Portland, Oregon
The Angular 2 Rewrite Turns a Migration Lesson Into a Security Bill: AngularJS Still Draws 533,480 Downloads a Week, and 10 Advisories Have No Open-Source Fix
October 28, 2026
Hundreds of yellow rubber ducks floating in a river enclosure during a duck race
WordPress 7.1.4 Closes an Unauthenticated Race in Its Own Update Routine, but 19 Older Branches Had No Backport Hours After Release
October 28, 2026
SXZ.io SXZ.io
  • Home

Categories

Articles 270 Posts
News 273 Posts
Learning Hub 243 Posts
Home/Learning Hub/Wildcard Certificates With Certbot: DNS-01 Checklist for Hosting Admins
Learning Hub

Wildcard Certificates With Certbot: DNS-01 Checklist for Hosting Admins

A precise checklist for issuing Let’s Encrypt wildcard certificates with Certbot, DNS-01 validation, restricted DNS API tokens, renewal tests, and safe deploy hooks.

June 9, 2026 5 Min Read
66

A wildcard certificate is useful when a hosting admin needs one certificate to cover many first-level subdomains, but the validation method matters. Let’s Encrypt says DNS-01 proves control by publishing a TXT record under _acme-challenge.<YOUR_DOMAIN>, and it specifically notes that DNS-01 can issue wildcard certificates. Let’s Encrypt also says DNS-01 is harder to configure than HTTP-01 and only makes sense for automation when the DNS provider has an API.

Table Of Content

  • Use DNS automation, not manual renewal
  • Protect the DNS token like a production secret
  • Example Cloudflare command
  • Pre-flight checklist
  • DNS-01 production runbook: prove DNS before renewal day
  • Target system: DNS admin workstation with dig installed
  • Target system: Ubuntu/Debian Certbot host storing a Cloudflare token
  • Target system: Ubuntu/Debian Certbot host issuing apex plus wildcard
  • Target system: Ubuntu/Debian Certbot host after issuance
  • cPanel/WHM decision point

Use DNS automation, not manual renewal

Certbot’s manual plugin can obtain a certificate by asking you to perform validation yourself, but Certbot’s own table says manually created certificates do not support autorenewal unless you provide an authentication hook to automate the validation steps. For hosting work, that makes a provider-specific DNS plugin the safer default.

DigitalOcean’s tutorial is a useful topic seed for wildcard issuance, but the operational rule should come from the ACME client and CA documentation: pick the DNS plugin that matches your provider, test it on a non-critical host first, and make renewal boring. The DigitalOcean guide covers wildcard issuance with Certbot and DNS-01 workflow examples.

Protect the DNS token like a production secret

With the Cloudflare Certbot plugin, the credentials file is passed with --dns-cloudflare-credentials. The plugin documentation recommends restricted Cloudflare API tokens over a global API key and says the token needs Zone:DNS:Edit permissions only for the zones that need certificates.

The same documentation warns that users who can read the credentials file can use those credentials to issue API calls on your behalf, and says Certbot will warn about unsafe permissions until access is restricted, for example with chmod 600. That means the credential file belongs outside the web root and should be readable only by the account that runs Certbot.

Example Cloudflare command

After the matching Certbot DNS plugin is installed, a typical Cloudflare command for the apex plus first-level wildcard looks like this:

sudo certbot certonly 
  --dns-cloudflare 
  --dns-cloudflare-credentials /etc/letsencrypt/cloudflare.ini 
  --dns-cloudflare-propagation-seconds 60 
  -d example.com 
  -d '*.example.com'

The exact plugin flag changes by DNS provider, but the pattern does not: request the apex and wildcard names together, use DNS-01, and wait long enough for TXT-record propagation before validation. The Cloudflare plugin documents the --dns-cloudflare, credentials-file, and propagation-seconds options.

Pre-flight checklist

  • Confirm the scope. *.example.com covers app.example.com, not every deeper name such as a.b.example.com. RFC 6125 gives the example that *.example.com matches foo.example.com but not bar.foo.example.com or example.com. Add only the names you actually serve.
  • Keep DNS tokens scoped. Use one restricted token per operational boundary when possible.
  • Test renewal before launch. Run sudo certbot renew --dry-run and fix DNS propagation or credential errors before the certificate is relied on in production. Certbot’s user guide documents dry-run renewal testing before relying on automated renewal.
  • Use deploy hooks carefully. Reload Nginx, Apache, or a control-panel service only after its configuration test passes. Certbot’s user guide documents deploy hooks for renewal-time scripts.
  • Document the owner. A wildcard certificate can quietly become a shared dependency for many subdomains; someone must own renewal alerts.

Wildcard certificates are powerful because they reduce certificate sprawl, but they also centralize risk. Treat the DNS API token, renewal timer, and deploy hook as production infrastructure, not as a one-time command copied from a tutorial.

Featured image credit: “Wildcard SSL certificate Explaination” by PeggyPesiri, licensed under CC BY-SA 3.0, via Wikimedia Commons.

DNS-01 production runbook: prove DNS before renewal day

This section applies to an Ubuntu/Debian ACME host running Certbot with a provider-specific DNS plugin. It does not apply to a shared cPanel account where you only control files under your home directory. On cPanel/WHM servers, avoid unmanaged Certbot changes to web-server certificate paths unless you also own the WHM integration and renewal process; WHM’s AutoSSL and SSL-install interfaces are designed to manage certificates inside that stack. cPanel Manage AutoSSL

Before issuing a wildcard certificate, confirm four prerequisites: the domain’s authoritative DNS provider, a DNS API token scoped to the relevant zone, root or sudo access on the ACME host, and the exact names required. A request for *.example.com does not cover example.com itself, so most hosting setups request both names in the same lineage. Let’s Encrypt documents DNS-01 as the challenge type that can issue wildcard certificates by publishing a TXT record under _acme-challenge. Let’s Encrypt DNS-01 challenge docs

Target system: DNS admin workstation with dig installed

dig +short NS example.com
dig TXT _acme-challenge.example.com @AUTHORITATIVE_NAMESERVER

The first command identifies where Let’s Encrypt will expect the TXT record to exist. The second command should be run during validation or after a failed attempt, replacing AUTHORITATIVE_NAMESERVER with one of the actual nameservers. If the TXT record appears in a convenience DNS panel but not at the authoritative nameserver, Certbot will fail even though the local panel looks correct.

Target system: Ubuntu/Debian Certbot host storing a Cloudflare token

sudo install -d -m 700 /etc/letsencrypt/secrets
sudo install -m 600 -o root -g root cloudflare.ini /etc/letsencrypt/secrets/cloudflare.ini

The Cloudflare DNS plugin documentation warns that anyone who can read the credentials file can use those credentials. Use a restricted API token with DNS edit permission only for the needed zone, store it outside the web root, and keep file permissions tight. Certbot Cloudflare plugin docs

Target system: Ubuntu/Debian Certbot host issuing apex plus wildcard

sudo certbot certonly 
  --dns-cloudflare 
  --dns-cloudflare-credentials /etc/letsencrypt/secrets/cloudflare.ini 
  --dns-cloudflare-propagation-seconds 120 
  -d example.com 
  -d '*.example.com'

The propagation delay is not cosmetic. If the DNS provider updates slowly, Certbot may ask Let’s Encrypt to validate before the TXT record is visible from public resolvers. Raise the propagation seconds when failures mention missing or incorrect TXT records. If you delegate _acme-challenge with a CNAME to a separate validation zone, document that delegation because future DNS migrations often break renewals silently.

Target system: Ubuntu/Debian Certbot host after issuance

sudo certbot certificates
sudo certbot renew --dry-run
sudo openssl x509 -in /etc/letsencrypt/live/example.com/fullchain.pem -noout -subject -issuer -dates -ext subjectAltName

certbot certificates confirms the lineage and configured names. renew --dry-run proves that the renewal path can authenticate without a human adding TXT records. Certbot’s documentation explains automated renewals and why manual DNS creation is not enough unless hooks automate validation. Certbot automated renewal docs The OpenSSL check confirms the served certificate includes the apex and wildcard names you intended. Common failure modes are wrong DNS provider, an API token scoped to the wrong zone, unsafe credential-file permissions, too-short propagation delay, and a deploy hook that renews the certificate but never reloads the service that uses it.

cPanel/WHM decision point

For cPanel/WHM, decide who owns the final installation. If WHM AutoSSL owns the domain, manage renewal there. If an external Certbot host issues the wildcard, install it through a supported WHM/cPanel SSL path and document the replacement schedule; otherwise the certificate can renew correctly on disk while Apache, Nginx, mail, or the control panel continues serving the old certificate. cPanel SSL installation docs

Tags:

CertbotDNS-01Hosting SecurityLet’s EncryptTLS

Share

Rows of data center cooling equipment on a large facility roof, representing hosting capacity planning.
Previous Post

Summer Traffic Is a Capacity Test for Hosting Providers, Not a Slow Season

Cybersecurity responders gathered around laptops during an incident-response exercise.
Next Post

Cloudflare Says AI Defense Needs Architecture, Not Just Faster Patches

No Comment! Be the first one.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Latest
28 Oct
How to Run Zero-Downtime Schema Migrations on PostgreSQL 18 and Block Unsafe ALTER TABLE Statements With a Python Lint Gate
28 Oct
The Angular 2 Rewrite Turns a Migration Lesson Into a Security Bill: AngularJS Still Draws 533,480 Downloads a Week, and 10 Advisories Have No Open-Source Fix
Trending
October 28, 2026
How to Run Zero-Downtime Schema Migrations on PostgreSQL 18 and Block Unsafe ALTER TABLE Statements With a Python Lint Gate
October 28, 2026
The Angular 2 Rewrite Turns a Migration Lesson Into a Security Bill: AngularJS Still Draws 533,480 Downloads a Week, and 10 Advisories Have No Open-Source Fix
October 28, 2026
WordPress 7.1.4 Closes an Unauthenticated Race in Its Own Update Routine, but 19 Older Branches Had No Backport Hours After Release
October 28, 2026
How to Compress Time-Series Metrics in Python With Gorilla Delta-of-Delta and XOR Encoding
October 28, 2026
NIST’s Final Post-Quantum Transition Report Puts Every Quantum-Vulnerable Public-Key Scheme on One 2030 and 2035 Clock, and Three Federal Documents Word the Deadline Three Ways
October 28, 2026
Honeypots Recorded Probes Against Oracle E-Business Suite CVE-2026-101767 Seven Days After Its Patch, and the Finder’s Write-Up Is Dated Patch Day

Related Posts

A laptop wrapped in a chain and padlock, illustrating least-privilege controls for AI agents.
Learning Hub

How to Secure Tool-Using AI Agents Before They Touch Production

June 8, 2026
Colorful sticky notes arranged on an office wall, symbolizing governance checklists and planning.
Learning Hub

AI Governance for Agentic Apps: A Practical Checklist for Builders

June 8, 2026
A technician connects green fiber optic cables at a data center, representing a private production inference endpoint.
Learning Hub

How to Deploy a Fine-Tuned LLM Behind a Private Production Inference Endpoint

June 8, 2026
Narrow aisle behind black supercomputer racks in a data center
Learning Hub

Kubernetes SELinux Volume Labeling: What Cluster Operators Should Audit Before v1.37

June 8, 2026
SXZ.io SXZ.io
  • [email protected]

Categories

Articles
Learning Hub
News

All Rights Reserved by SXZ.io ©2026