Zones

Export a Zone file

Returns a generated Zone file in BIND (RFC 1034/1035) format.

Only applicable for Zones in primary mode.

Operation specific errors

StatusCodeDescription
422incorrect_zone_modeThis operation is not supported for this Zone's mode.
get/zones/{id_or_name}/zonefile

Request

  • Base URL: https://api.hetzner.cloud/v1
  • URL: https://api.hetzner.cloud/v1/zones/{id_or_name}/zonefile
  • Auth: HTTP bearer

Path parameters

id_or_namestring required

ID or Name of the Zone.

ID or Name of the Zone.

Response

Request succeeded.

zonefilestring required

Generated zone file.

Example:

$ORIGIN	example.com.
$TTL	3600

@	IN	SOA	hydrogen.ns.hetzner.com. dns.hetzner.com. 2024010100 86400 10800 3600000 3600

@	IN	10800	NS	hydrogen.ns.hetzner.com. ; Some comment.
@	IN	10800	NS	oxygen.ns.hetzner.com.
@	IN	10800	NS	helium.ns.hetzner.de.

Example response

{
  "zonefile": "$ORIGIN\texample.com.\n$TTL\t3600\n\n@\tIN\tSOA\thydrogen.ns.hetzner.com. dns.hetzner.com. 2024010100 86400 10800 3600000 3600\n\n@\tIN\t10800\tNS\thydrogen.ns.hetzner.com. ; Some comment.\n@\tIN\t10800\tNS\toxygen.ns.hetzner.com.\n@\tIN\t10800\tNS\thelium.ns.hetzner.de.\n"
}

Changes

No recorded changes to this operation across all 1 revision of this API.