DNS-01 is the ACME challenge type that supports wildcard certificates (*.example.com). It proves domain ownership by adding a TXT record to your DNS — no web server or port 80 access needed.
How it works
- Let’s Encrypt provides a token for each domain
- GetHTTPS computes a SHA-256 digest of the key authorization and base64url-encodes it
- You create a TXT record at
_acme-challenge.yourdomain.comwith this value - Let’s Encrypt queries public DNS for the TXT record
- If the value matches, the challenge passes and the certificate is issued
With GetHTTPS, steps 1-2 are automatic — you just copy-paste the record name and value into your DNS provider.
Step-by-step setup
Step 1: Get the TXT record details from GetHTTPS
GetHTTPS shows you:
- Record name:
_acme-challenge.yourdomain.com - Record value: a base64url-encoded string (~43 characters)
Step 2: Add the TXT record at your DNS provider
| Field | Value |
|---|---|
| Type | TXT |
| Name | _acme-challenge (some providers auto-append the domain) |
| Value | The string shown by GetHTTPS — copy-paste exactly |
| TTL | 60 seconds (or the lowest your provider allows) |
Provider-specific instructions:
Cloudflare
- Dashboard → your domain → DNS → Records → Add record
- Type: TXT, Name:
_acme-challenge, Content: paste value - TTL: Auto
- Click Save
AWS Route 53
- Hosted zones → your domain → Create record
- Record name:
_acme-challenge - Record type: TXT
- Value:
"paste-value-here"(include the double quotes — Route 53 requires them) - TTL: 300
- Click Create records
GoDaddy
- DNS Management → Add
- Type: TXT, Name:
_acme-challenge, Value: paste value - TTL: 1 Hour (lowest available)
- Click Save
Namecheap
- Domain List → Manage → Advanced DNS → Add new record
- Type: TXT, Host:
_acme-challenge, Value: paste value - TTL: Automatic
- Click Save all changes
Google Cloud DNS
gcloud dns record-sets create _acme-challenge.yourdomain.com. \
--zone=your-zone --type=TXT --ttl=60 --rrdatas="the-value"
DigitalOcean
- Networking → Domains → your domain → Add record
- Type: TXT, Hostname:
_acme-challenge, Value: paste value - TTL: 30
Step 3: Wait for DNS propagation
DNS changes take 1-15 minutes depending on your provider and TTL settings. GetHTTPS’s pre-check verifies the TXT record is visible from the public internet before submitting to Let’s Encrypt.
Check propagation manually:
dig TXT _acme-challenge.yourdomain.com +short
# Should return your value (in quotes)
Or use an online propagation checker to see if the record is visible globally.
Step 4: Verify in GetHTTPS
Click Verify. GetHTTPS submits the challenge to Let’s Encrypt. If the TXT record is correct, the certificate is issued.
Step 5: Clean up
After the certificate is issued, delete the _acme-challenge TXT record from your DNS. It’s no longer needed and leaving stale records can cause confusion during renewal.
Wildcard certificates with DNS-01
To get a certificate for *.yourdomain.com, you must use DNS-01. HTTP-01 cannot validate wildcards because a wildcard covers infinite hostnames — there’s no single server to place a file on.
Wildcard + bare domain: If you want both *.example.com and example.com, GetHTTPS may require two validations. Some setups need two TXT records at _acme-challenge.example.com simultaneously — one for the wildcard, one for the apex. Keep both records until validation passes.
Full wildcard certificate guide →
DNS-01 vs HTTP-01
| DNS-01 | HTTP-01 | |
|---|---|---|
| What you do | Add a TXT record in DNS | Place a file on your server |
| Access needed | Domain DNS settings | Web server file system |
| Port requirement | None | Port 80 must be open |
| Wildcard support | ✅ Required for wildcards | ❌ |
| Works without a server | ✅ | ❌ |
| Speed | 1-15 min (DNS propagation) | Instant (if file is accessible) |
| Works behind CDN | ✅ Always | ⚠️ May need CDN bypass |
| Best for | Wildcards, no-server, CDN setups | Most single-domain certs |
Choose DNS-01 when: you need a wildcard, port 80 is blocked, your server isn’t publicly accessible, or you’re behind a CDN.
Choose HTTP-01 when: you have a web server, port 80 is open, and you don’t need a wildcard. It’s faster (no propagation wait).
Troubleshooting
TXT record not found by GetHTTPS
- Wait longer — some providers take 5-15 minutes. Low TTL helps but doesn’t eliminate propagation time.
- Check the record name: Some providers auto-append the domain. If you enter
_acme-challenge.example.comand the provider appends.example.com, the actual record becomes_acme-challenge.example.com.example.com(wrong). Enter just_acme-challengeand let the provider append. - Verify manually:
If this returns empty, the record isn’t propagated yet.dig TXT _acme-challenge.yourdomain.com +short
Wrong value / case mismatch
- The value is case-sensitive. Copy-paste directly from GetHTTPS — don’t re-type it.
- Don’t add quotes unless your DNS provider requires them (Route 53 does, most others don’t).
Multiple TXT records conflict
- Remove old
_acme-challengeTXT records from previous attempts before adding new ones. - Exception: wildcard + apex validation may need two records at the same name simultaneously.
DNS provider doesn’t support TXT records
Rare, but some basic DNS services lack TXT support. Switch to a full-featured DNS provider (Cloudflare’s free plan supports all record types).
When to use DNS-01
| Scenario | DNS-01? |
|---|---|
Wildcard certificate (*.example.com) | ✅ Required |
| Port 80 blocked | ✅ Best option |
| Server on internal network | ✅ Only option |
| Behind Cloudflare/CDN proxy | ✅ Avoids proxy issues |
| Domain without a server (parking, redirect) | ✅ Only option |
| Simple single-domain cert with server access | ⚠️ HTTP-01 is faster |
Frequently asked questions
Can I automate DNS-01 challenges?
Yes, with CLI tools. acme.sh has built-in API integrations for 150+ DNS providers — it can add and remove TXT records automatically. Certbot supports DNS plugins for major providers. GetHTTPS requires manual DNS changes (browser-based, no API calls).
Is it safe to give an ACME client my DNS API key?
The API key has write access to your DNS zone, so treat it with the same security as your server credentials. Use scoped API tokens when possible (e.g., Cloudflare’s per-zone tokens). For maximum security, use GetHTTPS with manual DNS changes — no API keys involved.
How long do I need to keep the TXT record?
Only during validation — typically a few minutes. Once your certificate is issued, delete the record. You’ll create a new one with a new value when you renew.
What if my DNS provider is slow to propagate?
Set the TTL as low as your provider allows (ideally 60 seconds). If propagation takes longer than 15 minutes, check for typos in the record name/value, or try a different DNS provider. Cloudflare propagates TXT records within seconds.
Does DNS-01 work with Cloudflare proxy (orange cloud)?
Yes. DNS-01 validation queries the TXT record via DNS, not HTTP — so the Cloudflare proxy status (orange vs gray cloud) doesn’t matter. This is a key advantage over HTTP-01, which can be blocked by the proxy.