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
- Dashboard
- CLI
- Open DNS → Zones and click Add zone.
- Enter the zone name, for example
example.com. - Open the zone and click Add record.
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:- Dashboard
- CLI
- 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.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 usednz 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:
# starts a comment:
hosts.txt
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:
--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 zoneexample.com that holds only intranet still resolves www.example.com
from public DNS.
What counts as having an answer
What counts as having an answer
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.
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.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.
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 showsdig 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.