Skip to content
gohacks.dev
DevOps

DNS Zone File Generator

Generate a BIND zone file with SOA, NS, A, AAAA, CNAME, MX, TXT, SRV and CAA records, and catch CNAME conflicts and missing trailing dots.

Free · No sign-up · Your inputs stay in your browser

Input

Generate a DNS zone file

Output

db.example.com

691 characters

The SOA email is written with its @ turned into a dot (and dots before the @ escaped), as RFC 1035 requires. Names without a trailing dot are relative to $ORIGIN. Check the file with named-checkzone example.com db.example.com before loading it; most DNS hosts also import this format.

Runs in this browser. Nothing you paste is sent to a server.

The trailing dot

In a zone file, a name without a trailing dot is relative to $ORIGIN. mail.example.net written without the dot in the example.com zone becomes mail.example.net.example.com., a classic outage. The SOA email also has its own rule: the @ becomes a dot. Both come from RFC 1035.

CNAME stands alone

A CNAME must be the only record at its name, so the apex, which always has SOA and NS records, cannot be a CNAME. DNS providers offer ALIAS, ANAME or CNAME flattening for that case. Check a zone with named-checkzone example.com db.example.com before loading it.

Share

Frequently asked questions

What is the SOA serial for?
Secondary servers compare it to decide whether to transfer the zone again. It must increase with every change; the YYYYMMDDnn convention allows 100 changes a day.
Can I import this file into a DNS host?
Most providers, including Cloudflare and Route 53, import BIND zone files. They usually ignore the SOA and NS records and keep their own.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools