DNS Zone File Generator

Build a standard BIND zone file visually. Add A, AAAA, CNAME, MX, TXT, SRV, NS, and CAA records — the SOA header, serial, and TTLs are handled for you, with one-click SPF, DKIM, and DMARC helpers.

Zone & Name Servers

SOA & Timers

Records

5
Email TXT helpers:

Generated zone file

Save as example.com.zone (or db.example.com) and load it in BIND, or import into your DNS provider.

$ORIGIN example.com.
$TTL 3600

@   IN  SOA ns1.example.com. hostmaster.example.com. (
            2026010101   ; serial (YYYYMMDDnn)
            3600         ; refresh
            1800         ; retry
            1209600      ; expire
            86400      ) ; minimum / negative cache TTL

; Name servers
@                  IN NS    ns1.example.com.
@                  IN NS    ns2.example.com.

; A records (IPv4)
@                  IN A     192.0.2.1
www                IN A     192.0.2.1

; AAAA records (IPv6)
@                  IN AAAA  2001:db8::1

; MX (mail) records
@                  IN MX    10 mail.example.com.

; TXT records (SPF / DKIM / DMARC / verification)
@                  IN TXT   "v=spf1 include:_spf.example.com ~all"

Validate with named-checkzone example.com example.com.zone before loading.

Remember to bump the serial every time you change the zone.

About DNS Zone File Generator

The DNS Zone File Generator is a free online tool that builds copy-ready BIND-format zone files (RFC 1035 master files). Instead of hand-writing the SOA block, remembering trailing-dot rules, and aligning columns by hand, you fill in a form and the tool emits a clean, valid zone file ready for an authoritative name server or a DNS provider's import.

It covers the records that matter for most domains — A and AAAA for IPv4/IPv6 addresses, CNAME aliases, MX for mail, NS delegation, SRV service records, CAA for certificate authorities, and TXT for verification and email authentication. The SOA header is generated with a proper YYYYMMDDnn serial and sensible refresh/retry/expire/minimum timers, and dedicated SPF, DKIM, and DMARC helpers insert correctly-named TXT records.

Everything runs locally in your browser — your domains, IPs, and keys are never sent to a server. It pairs naturally with the Nginx Config Generator and .htaccess Generator when you're standing up a new site end to end.

How to Use DNS Zone File Generator

  1. 1. Enter your domain, admin email, and one or two name servers. These populate the $ORIGIN, SOA, and NS records.
  2. 2. Click Today to stamp the SOA serial with the current date, and adjust the $TTL and timers if needed (the defaults suit most zones).
  3. 3. Add records with the type buttons (A, AAAA, CNAME, MX, TXT, SRV, NS, CAA), or load a preset (Basic Website, Google Workspace, Microsoft 365).
  4. 4. For email, use the SPF / DKIM / DMARC helpers to drop in pre-named TXT records, then paste your real values.
  5. 5. Keep Auto-append trailing dot on so CNAME/MX/NS/SRV targets become fully qualified automatically.
  6. 6. Click Copy, save the file, validate with named-checkzone, and load it or import it into your DNS host.

Common Use Cases

Standing up a new domain

Generate the full zone — apex A record, www, mail, and name servers — in one pass instead of clicking through a provider UI.

Email authentication

Add SPF, DKIM, and DMARC TXT records with correct names and split long DKIM keys automatically to pass mail-server checks.

Migrating DNS providers

Produce a clean BIND file to import into Route 53, PowerDNS, or self-hosted BIND when moving away from a UI-only host.

Self-hosting BIND / Knot / NSD

Get a valid master file with a correct SOA and serial to drop straight into your authoritative server config.

Service discovery

Define SRV records for SIP, XMPP, Minecraft, or Matrix, and CAA records to lock down which CAs can issue certificates.

Learning DNS

See how SOA, NS, A, MX, and TXT records fit together in a real zone file, with apex-CNAME and trailing-dot pitfalls flagged for you.

Frequently Asked Questions