DNS plugin SSL / TLS Origin: Network OSI layer 7 · Application Last updated 18 Nov 2026

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.

Exact message you may see 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
Seen on: Certbot Cloudflare SSL

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

  1. Create a token with Zone DNS Edit for the right zone
  2. chmod 600 ~/.secrets/cf.ini
  3. Test the API call with curl

Detailed fix by platform

INI

  1. dns_cloudflare_api_token = YOUR_SCOPED_TOKEN

How to diagnose

  1. Token — Scoped right?
  2. File mode — 600?
  3. 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:

Where this error sits

Origin: Network. Errors that are often confused with or caused by this one (click to open):

archive — /etc/letsencrypt/live/<domain>/privkey.pem symlink to archive unreadable (permissions after certbot upgrade) (SSL / TLS)archiveCould 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 (SSL / TLS)Could not automatical…deploy hook — Certbot renewed the certificate but the server still serves the old one (deploy hook / reload failed) (SSL / TLS)deploy hookDjango — Django send_mail: ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] (EMAIL_USE_SSL vs EMAIL_USE_TLS on the wrong port) (Email / SMTP)DjangoIncorrect TXT record found at _acme-challenge — Certbot: DNS problem: NXDOMAIN looking up TXT for _acme-challenge.example.com / Incorrect TXT record (SSL / TLS)Incorrect TXT record …Invalid response from .well-known/acme-challenge: 404 — Certbot: Detail: Invalid response from http://example.com/.well-known/acme-challenge/abc: 404 (SSL / TLS)Invalid response from…lock — Certbot: Another instance of Certbot is already running (SSL / TLS)lockplugin — Certbot: The requested nginx plugin does not appear to be installed (or "No installers found") (SSL / TLS)pluginDNS plugin

Explore the map of this error Full error map →

🧠 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.