1. Home
  2. Developer tools
  3. BIND Zone File Generator

BIND Zone File Generator

Write a clean zone file from a table of records, or paste an existing one and see what is wrong with it before your DNS server does.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use BIND Zone File Generator

  1. Choose Build or Check.
  2. Enter your records, or paste the zone file.
  3. Copy the file or fix the findings.

Features

  • SOA, NS, A, AAAA, CNAME, MX, TXT, SRV, CAA and PTR
  • Adds trailing dots where targets are complete names
  • Splits long TXT values into 255-byte strings
  • Checks SOA, apex NS, CNAME conflicts and duplicates
  • Finds IP addresses used as targets and bad addresses
  • Nothing uploaded

Supported formats

Input

  • Record list
  • BIND zone file

You get

  • Zone file
  • List of problems

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the BIND Zone File Generator is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • It supports the common record types only and does not sign zones.
  • The checker finds structural mistakes, not every error named-checkzone would.

Guide

Writing and checking a BIND zone file

Zone files are the text form of DNS, and they are unforgiving. A missing dot, a CNAME in the wrong place or a stale serial rarely produces an error at the moment you save; it produces an outage when the server reloads. The page has two modes: build a complete file from a table of records, or paste an existing zone and have it examined.

What a zone file contains

The file begins with two directives. $ORIGIN example.com. sets the domain that relative names are completed with, and $TTL 1h sets the default time to live. Then comes the SOA record with the primary server, the contact (with a dot for @), the serial and four timers, followed by the resource records, each with a name, optional TTL, class IN, type and data. The builder writes the SOA with sample timers of two hours for refresh, thirty minutes for retry, two weeks for expire and one hour for negative caching, each annotated with a comment, and lets you set the serial.

The trailing dot

The most common mistake in zone files is writing a target without its final dot. Inside a zone, a name that does not end in a dot is relative: the origin is appended. So MX 10 mail.example.com in the zone example.com points to mail.example.com.example.com, which does not exist, and mail disappears. The builder avoids it by adding the dot to targets that look like complete names. The checker flags the problem in files you paste.

The rules the checker applies

A zone needs an SOA and at least one NS at its apex. A name with a CNAME cannot hold any other record (RFC 1034), so a CNAME at the apex, where SOA and NS must exist, is an error. An MX or NS target must be a host name, not an IP address. A name server inside the zone needs address records so that the parent can publish glue. Addresses are checked for validity, and duplicate records are reported with both line numbers. TXT values longer than 255 bytes are written as several quoted strings.

A worked example

On the Build tab the sample produces a zone with two NS records, an address for ns1, an apex A record, www as a CNAME of @, an MX of 10 mail.example.com. and a TXT record "v=spf1 mx -all", and the checker confirms “No problems found”. On the Check tab, press Sample for a deliberately faulty file. The findings read: line 5, a name server inside the zone with no A or AAAA record, so glue is needed; line 7, the MX target mail.example.com has no trailing dot and is read as mail.example.com.example.com; line 8, a CNAME at the apex, plus the rule that a CNAME must be the only record at its name; line 10, 999.0.2.25 is not a valid IPv4 address; and line 11, a duplicate of line 9.

Limits

The checker looks for the common structural mistakes. It does not implement every record type or validate DNSSEC material, and directives beyond $ORIGIN and $TTL may not be handled. Run named-checkzone example.com example.com.zone from BIND before loading a zone into a live server, and remember to raise the serial. Nothing you enter is sent anywhere. To inspect the zone after publishing, use the DNS Lookup and SOA Lookup.

Checked against the current version of the BIND Zone File Generator on .

Frequently asked questions

What does the @ sign stand for in a zone file?

It stands for the current origin, the zone's own name. A line beginning with @ describes the zone apex, for example the SOA, the NS records and the main A record.

Why must the serial number go up with every edit?

Secondary servers decide whether to fetch the zone by comparing the serial with their copy. If you edit the records and leave the serial unchanged, secondaries keep serving the old data. The date style YYYYMMDDnn makes this easy to do by hand.

What does a missing trailing dot do?

A name without a final dot is relative to the zone origin. mail.example.com in the zone example.com becomes mail.example.com.example.com.

Is this a full replacement for named-checkzone?

No. It catches the common structural mistakes but does not implement every record type or DNSSEC rule. Run named-checkzone before loading a zone.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.