BYTETOOLS

DNS Zone File Generator

Build a complete BIND zone file online: $ORIGIN, $TTL, a full SOA record with date-based serial, plus NS, A, AAAA, CNAME, MX, TXT and SRV rows.

Records (0)

No records yet. Click “Add record” — the zone file below will still contain a valid $ORIGIN, $TTL and SOA.

0
Records written
3600s
Default TTL
Serial

Zone file for example.com

The finished BIND zone file appears here as soon as the SOA fields and every record row are valid.

The file is assembled entirely in your browser — nothing is uploaded and no DNS query is made. Remember to bump the serial every time you edit a zone, or secondary name servers will keep serving the old copy.

What is the DNS Zone File Generator?

The DNS Zone File Generator writes a ready-to-load BIND zone file from a form. You fill in the zone name, the primary name server and the hostmaster address, set the SOA timers, then add records row by row — and the tool emits properly aligned, correctly quoted zone syntax with the trailing dots in the right places.

  • Full SOA block with primary NS, RFC-1035-style hostmaster name and all four timers
  • One-click date-based serial in the YYYYMMDDnn convention
  • Add and remove record rows for A, AAAA, CNAME, MX, TXT, NS, SRV, CAA and PTR
  • TXT values over 255 characters are automatically split into quoted chunks
  • Catches apex CNAMEs, CNAME-plus-other-data clashes and missing apex NS records
  • Column-aligned output you can copy or download — nothing is ever uploaded

How to use the DNS Zone File Generator

  1. 1

    Enter your zone name, default TTL, primary name server and hostmaster email address.

  2. 2

    Adjust the SOA refresh, retry, expire and minimum timers, or leave the sensible defaults, and press the refresh button to stamp today's serial.

  3. 3

    Click “Add record” for each entry, pick the type, type the name (@ for the apex) and the value, and fill in the extra MX or SRV fields when they appear.

  4. 4

    Read any red errors or amber warnings — a CNAME clash or a missing apex NS is caught before you save.

  5. 5

    Copy the finished zone file or download it as db.yourdomain, then load it into BIND, Knot or NSD.

About the DNS Zone File Generator

The DNS Zone File Generator writes a ready-to-load BIND zone file from a form. You fill in the zone name, the primary name server and the hostmaster address, set the SOA timers, then add records row by row — and the tool emits properly aligned, correctly quoted zone syntax with the trailing dots in the right places.

It handles the details that trip people up by hand: the hostmaster email is rewritten from an @ into a dot as RFC 1035 requires, long TXT values are split into 255-character quoted strings, MX and SRV get their preference, weight and port fields, and the serial is stamped in the usual YYYYMMDDnn form with one click.

Everything is assembled in your browser with JavaScript. No zone data is uploaded, no DNS query is made, and the page keeps working with the network disconnected — useful when you are drafting a zone for a server that is not reachable yet.

Frequently asked questions

What is a DNS zone file?

A zone file is the plain-text database a name server loads to answer queries for a domain. It starts with $ORIGIN and $TTL directives and an SOA record, then lists every resource record — NS, A, MX and the rest — one per line. BIND, Knot and NSD all read the same format.

Why does the hostmaster email use a dot instead of an @?

The SOA RNAME field is stored as a domain name, not an email address, so hostmaster@example.com is written hostmaster.example.com. — the first dot stands in for the @. This tool does the substitution for you and escapes any dot that was already in the local part.

What serial number format should I use?

The most common convention is YYYYMMDDnn: the date plus a two-digit revision counter, so 2026080103 is the third change made on 1 August 2026. What matters is that the number always increases, because secondary servers only pull a new copy when the serial goes up.

What are good SOA refresh, retry and expire values?

A typical set is refresh 7200, retry 3600, expire 1209600 and minimum 3600. Retry should be shorter than refresh, and expire much longer than both — a fortnight is normal, so a secondary keeps serving through a long outage at the primary.

Why can't the zone apex be a CNAME?

The apex must carry SOA and NS records, and a name holding a CNAME may hold no other data at all. That is why providers invented non-standard ALIAS or ANAME records. The generator flags an apex CNAME as an error rather than letting you publish a zone that will not load.

Is my zone data sent anywhere?

No. The whole file is built in your browser with JavaScript. Nothing is transmitted, nothing is stored on a server, and no DNS lookup is performed — you can even use it offline once the page has loaded.

Related tools