Certbot DNS plugin: Error determining zone / invalid credentials (Cloudflare/Route53 API token)
The DNS-01 plugin can't create the _acme-challenge TXT record because the API token is wrong or lacks permissions.
Error determining zone_id: 1001 Unable to determine zone_id for example.com using zone namesUnsafe permissions on credentials configuration filecertbot-dns-cloudflare invalid credentialsCloudFlare API Token authentication error 9109Route53 AccessDenied certbot Meaning
Create a scoped API token (Zone:DNS:Edit for the zone), store it in the credentials file with mode 600 (dns_cloudflare_api_token = ...), make sure the account has the zone, and check for extra whitespace. Route53 needs IAM route53:ChangeResourceRecordSets.
Common causes
- Token lacks Zone:DNS:Edit/permission
- Token scoped to another zone
- Credentials file mode too open (warning/error)
- Wrong key name in the ini file
- Rate limiting or API outage
⚡ Quick fix
- Create a token with Zone DNS Edit for the right zone
chmod 600 ~/.secrets/cf.ini- Test the API call with curl
Detailed fix by platform
INI
dns_cloudflare_api_token = YOUR_SCOPED_TOKEN
How to diagnose
- Token — Scoped right?
- File mode — 600?
- Zone — Accessible?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- archive /etc/letsencrypt/live/<domain>/privkey.pem symlink to archive unreadable (permissions after certbot upgrade)
- Could not automatically find a matching server block Certbot: Could not automatically find a matching server block for example.com. Set the `server_name` directive to use the Nginx installer
- deploy hook Certbot renewed the certificate but the server still serves the old one (deploy hook / reload failed)
Most viewed in SSL / TLS
- HTTPSConnectionPool: Max retries exceeded (SSLError) Python requests: HTTPSConnectionPool(host='api.example.com', port=443): Max retries exceeded with url: /v1 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] ...')))
- DST Root CA X3 expired (old clients fail) Old clients: certificate has expired — Let's Encrypt chain uses expired DST Root CA X3 (OpenSSL 1.0.x, Android < 7.1.1)
- Keystore was tampered with, or password was incorrect Java keytool: java.io.IOException: Keystore was tampered with, or password was incorrect
Other ways to find it
Where this error sits
Origin: Network. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 18 Nov 2026