# Hetzner Zones API

**Canonical:** https://apis.io/apis/hetzner/hetzner-zones-api/  
**Provider:** Hetzner — https://apis.io/providers/hetzner/  
**Base URL:** https://api.hetzner.cloud/v1  
**Documentation:** https://docs.hetzner.cloud/

Hetzner Zones API is one of 32 APIs that [Hetzner](https://apis.io/providers/hetzner/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. Tagged areas include Zones. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and a getting-started guide.

A Zone represents a [Domain Name System (DNS) zone](https://wikipedia.org/wiki/DNS_zone) managed by Hetzner authoritative nameservers. Please see [Hetzner Docs](https://docs.hetzner.com/dns-console/dns/general/dns-overview#the-difference-between-domain-and-zone) for the difference between zones and domains. This API supports all zone names with [well-known public suffixes](https://publicsuffix.org/) (e.g. `.de`, `.com`, `.co.uk`). Subdomains are not supported. <h3 id="tag/zones/zone-modes">Zone Modes</h3> This API supports two types of zone modes. - In _primary_ mode, resource record sets ([RRSets](#tag/zone-rrsets)) and resource records (RRs) are managed via the Cloud API or Hetzner Console. - In _secondary_ mode, Hetzner's nameservers query [RRSets](#tag/zone-rrsets) and RRs from given primary nameservers via [AXFR](https://en.wikipedia.org/wiki/DNS_zone_transfer). The zone mode cannot be changed, the zone must be deleted and re-created with a new mode. ### SOA Serial For zones in primary mode, Hetzner automatically increases the `SOA` record serial number. As convention, a `YYYYMMDDnn` format with incrementing `nn` is used. <h3 id="tag/zones/zone-file-import">Zone file import</h3> This API supports importing a zone file in BIND (RFC [1034](https://datatracker.ietf.org/doc/html/rfc1034)/[1035](https://datatracker.ietf.org/doc/html/rfc1035)) format. Importing a zone file is only applicable for [Zones](#tag/zones) in primary mode. During an import: - An `$ORIGIN` directive may be present, it must match the [Zone](#tag/zones)'s name with an ending dot - A `$TTL` directive may be present, it is used as new default [Zone](#tag/zones) Time To Live (TTL) - Only `IN` (internet) class records are allowed - The assigned authoritative Hetzner nameservers must be present as `NS` records - A `SOA` record must be present - Comments for individual records are imported, comments on their own lines are discarded Zone file example: ```dns $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. ```

## Machine-readable artifacts (3)

- **OpenAPI** — https://raw.githubusercontent.com/api-evangelist/hetzner/refs/heads/main/openapi/hetzner-zones-api-openapi.yml
- **Documentation** — https://docs.hetzner.cloud/
- **GettingStarted** — https://docs.hetzner.cloud/#getting-started

## Other Hetzner APIs (12)

- [Hetzner DNS API](https://apis.io/apis/hetzner/hetzner-dns-api/)
- [Hetzner Actions API](https://apis.io/apis/hetzner/hetzner-actions-api/)
- [Hetzner Certificate Actions API](https://apis.io/apis/hetzner/hetzner-certificate-actions-api/)
- [Hetzner Certificates API](https://apis.io/apis/hetzner/hetzner-certificates-api/)
- [Hetzner Data Centers API](https://apis.io/apis/hetzner/hetzner-data-centers-api/)
- [Hetzner Firewall Actions API](https://apis.io/apis/hetzner/hetzner-firewall-actions-api/)
- [Hetzner Firewalls API](https://apis.io/apis/hetzner/hetzner-firewalls-api/)
- [Hetzner Floating IP Actions API](https://apis.io/apis/hetzner/hetzner-floating-ip-actions-api/)
- [Hetzner Floating IPs API](https://apis.io/apis/hetzner/hetzner-floating-ips-api/)
- [Hetzner Image Actions API](https://apis.io/apis/hetzner/hetzner-image-actions-api/)
- [Hetzner Images API](https://apis.io/apis/hetzner/hetzner-images-api/)
- [Hetzner ISOs API](https://apis.io/apis/hetzner/hetzner-isos-api/)

## Tags

Zones

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/hetzner/hetzner-zones-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/hetzner/.
