Skip to main content
A zone is a domain that DNZ answers for itself, such as example.com, corp.internal or home.lan. Every zone belongs to one division. DNZ keeps zones in its database and in memory, and reloads them on every change, so a new record is answered right away. Names outside your zones are forwarded to the upstreams (see Forwarding). You manage zones under DNS → Zones, with the dnz zone and dnz record commands, or over the API.

Create a zone

  1. Open DNS → Zones and click Add zone.
  2. Enter the zone name, for example example.com.
  3. Open the zone and click Add record.
To start from an existing BIND zone file, click Import zone instead. See Import and export.
Creating a zone needs the zones.write permission; adding records needs records.write. See Users, divisions and roles. DNZ writes the zone’s SOA and apex NS records itself. The nameserver in them comes from DNZ_NAMESERVER (default ns1.dnz.local). The SOA serial goes up with every change.

Record types

A * wildcard name catches every subdomain that has no records of its own. DNZ stores these types in one canonical form (hex in upper case, names absolute and in lower case), so the same record always reads the same. A DNAME (RFC 6672) answers a query for www.old.example.com, with old IN DNAME new.example.net, with the DNAME, a CNAME www.old.example.com → www.new.example.net made from it, and the target’s records when the target is in one of DNZ’s zones. The DNAME’s own name is not redirected and keeps its other records. Names below a DNAME can’t have records, and a name has at most one DNAME. DNZ answers with automatic SOA, follows CNAME chains, and sends negative answers with the SOA. An unknown EDNS version gets BADVERS.
Records that a dynamic update client sends in other types (DHCID, TXT split into several strings) are kept exactly as received and shown as Read-only in the editor. You can turn them off, tag them or delete them there, but not edit them.

The record editor

Open a zone under DNS → Zones to see its records. Add record opens a form with these fields:
  • Add record: fill in the form and save.
  • Edit: click a record row.
  • Search: the search box matches the name or the content. Filter narrows the list by type, on/off and tags.
  • Turn off / Turn on: the switch on each row.
  • Delete: open the record and click Delete. It stops resolving immediately.

Comments, tags and turning records off

A record can carry a comment and tags, and can be turned off without deleting it. A disabled record is kept, but it is not answered, not sent in zone transfers and not DNSSEC-signed.

View-only records

When the server has views, the Answer field lets a record be answered only to clients in one view. Such records carry a badge with the view’s name in the table. In the CLI, add --view:

Proxied records

An A, AAAA or CNAME record can go through one or more proxies, like Cloudflare’s orange cloud: DNS answers the name with the proxies’ addresses and the origin stays hidden. Once proxying is set up, the record form lists the proxies; one without a router for the record’s name shows no router for this name and can’t be picked until you add a route.
A name’s A, AAAA and CNAME records must all use the same proxies. See Proxy overview.

Traffic steering

Plain A and AAAA records can be answered by the client’s country or continent, by weight, and only while a health check of the address passes. Open a record and click Traffic steering…, or use dnz record steer. Steered records carry a badge with a green or red health dot. See GeoDNS and health checks.

Add many records at once

To add many subdomains on one IP, give several names in the Name field of Add record (press Enter after each, @ for the apex). Every name gets the same value, and the button changes to Add N records. From the CLI, add-many does the same. A line of --file may carry its own value after the name:
A names file holds one name per line or several separated by commas; # starts a comment:
hosts.txt
The records are added together, or none if one fails (a duplicate, a CNAME clash, a bad value).

Change many records at once

In the dashboard, tick records (Shift-click selects a range) and use the bar that appears: Turn on, Turn off, TTL, Tags, Comment or Delete. From the CLI, use --all or several --ids:
Changes to several records go in one request that is checked as a whole and applied all or nothing, with one serial bump and one audit log entry. Only TTL, comment, on/off, tags and proxies change in bulk; --value, --rename, --priority and --view change one record at a time. The API’s bulk endpoint takes up to 100 operations and 5000 records per request; see Records API.

Zone settings

The settings card at the bottom of a zone page holds three switches.

Default TTL

The TTL used for records added without one, 300 seconds unless you change it. It shows as Default in the record form and is used for imports without $TTL. Existing records keep their TTL.

Forward missing names

A local zone can override a few names of a public domain. With Forward missing names on (the default), names and record types the zone doesn’t have are forwarded to the upstreams instead of answered NXDOMAIN or NODATA. For example, a LAN zone example.com that holds only intranet still resolves www.example.com from public DNS.
Turn it off for a zone that is the whole truth for its domain.
A query the zone has no answer for goes through the normal path (filtering, forwarding rules, cache, upstreams). The zone has an answer when it has:
  • a record of the queried type, or a CNAME (chased as usual; the answer stays local wherever the chase ends),
  • a wildcard match,
  • the apex SOA and NS.
Views are respected: a name that a client’s view adds is answered for that client. Signed queries (update clients looking up a name’s zone, secondaries) always get this server’s answer. Changing the setting doesn’t bump the serial.
A DNSSEC-signed zone can’t forward missing names, because its denial proofs say missing names don’t exist. Turning DNSSEC on turns this off, and it can’t be turned back on while the zone is signed. Secondary zones never forward.

Serve this zone (turning a zone off)

Serve this zone off keeps the zone and its records without answering for them, like a pause. The zone shows an Off badge in the list.
A disabled zone is not answered, not sent in zone transfers (AXFR/IXFR) and not DNSSEC-signed. It also leaves the catalog zone, so DNZ secondaries drop it until it is turned on again (see Replication). Queries for its names are forwarded upstream instead. Turning a local zone on or off bumps its SOA serial.

Auto PTR

With Automatic PTR (reverse DNS) on under Settings → General, PTR queries (in-addr.arpa / ip6.arpa) are answered from your A and AAAA records, with no reverse zone needed. If www.lab.internal points at 10.0.0.5, a PTR query for 5.0.0.10.in-addr.arpa returns www.lab.internal. Nothing is written to your zones.
  • PTR records you add yourself in a reverse zone always win.
  • When several names share an address, all are returned, shortest first.
  • Wildcard records are skipped, since they don’t name one host.
  • Auto PTR follows views: a client in a view gets names from its view’s records.

Rules DNZ checks

  • CNAME exclusivity: a name with a CNAME can’t have other records, and the other way round.
  • Duplicates: the same record can’t exist twice.
Both checks only count enabled records, so a disabled CNAME can wait next to the A record it will replace. Turning a record on runs the checks, and a conflict is refused (HTTP 409).

Secondary zones are read-only

Zones copied from a primary (see Replication) show Read-only copy from its primary. You can read their records, but records, import, DNSSEC and Dynamic DNS/ACME tokens only work on the primary. The zone page shows the primary, the last transfer, when the copy expires, and any error. Refresh checks the primary now; Transfer again transfers even if the serial didn’t change.

Test a zone

The Test this zone card on a zone page shows dig commands for the zone’s first records, pointed at this server and its DNS port, ready to copy:

Import and export

Move zones in and out as BIND files, or to and from Cloudflare.

Views

Answer one name differently inside and outside.

GeoDNS and health checks

Answer by country, by weight, and only while an address is healthy.

DNSSEC

Sign a zone and get the DS record for your registrar.

CLI reference

Every zone and record command.