A zone export returns a portable BIND text representation of the managed DNS records. Use it for an independent inventory, migration preparation or a change record. Preserve provider-specific settings separately because a zone file cannot describe every hosting or DNS service feature.
| Method | Resource | Scope | Idempotency-Key |
|---|---|---|---|
POST |
/v2/dns/zones/{zoneId}/exports |
dns:export |
Required |
01 Export and save the exact content
- Confirm the owned zone ID and review its latest reconciliation state. If someone edited the provider directly, investigate that difference before relying on the management inventory.
- POST to the zone's
exportsresource with{"format":"bind"}and an idempotency key. - Read the returned
filename,content,sha256,record_countandconflictsfields. - Write the decoded
contentstring to a local file as-is. Do not save the JSON escape sequences, change line endings or append an extra newline before checking its digest. - Calculate SHA-256 over those exact file bytes and compare it with the response. Store the matching digest with the export date, zone ID and source server.
On a system with the standard utility available, sha256sum example.com.zone reads the saved file and displays its digest. The digest detects accidental differences from this export response. Keep your authenticated response or trusted change record as the reference; a hash alone is not an independent signature of ownership.
02 Understand export errors
DNS_EXPORT_NO_NAMESERVERS means the assigned server has not supplied the nameservers required to render a usable zone file. Ask the administrator to correct that configuration. Do not invent ns1.example.com without a working nameserver and its required delegation.
A management lock does not automatically prevent this read-only export, but provider capabilities and account permissions still apply. The service returns the text immediately and records an export audit entry; it does not provide access to arbitrary server files.
Common questions
Does the file include every Cloudflare or load-balancing option?
No. Record data is portable within the destination's supported types, while proxy modes, provider routing policies, health checks and other service settings need their own inventory.
Can I import the file without reviewing it?
Review the destination's accepted records, generated SOA and NS information, conflicts and current service dependencies first. Keep the original export untouched and make any migration adjustments in a separate working copy.