Skip to main content

DNS Zone File Generator

Generate a BIND-style DNS zone file from a domain, SOA settings, and a list of records (A, AAAA, CNAME, MX, TXT, NS, SRV, CAA). Handles TTL shorthand (1h/1d/1w), trailing-dot fully-qualified names, and SOA serial/refresh/retry/expire fields. Runs entirely in your browser — no DNS lookups.

Input

SOA Record

Either admin@example.com or dot notation (admin.example.com); the @ is converted for you.

Bump on every change. Convention is YYYYMMDDnn.

Supports shorthand: 1h, 1d, 1w.

One record per line: name [ttl] TYPE value. MX: priority target. SRV: priority weight port target. CAA: flags tag value. Lines starting with ; are ignored.

Output

Zone File
 
Was this helpful?

Guides

The DNS Zone File Generator builds a clean, BIND-style zone file from a domain name, its SOA (Start of Authority) settings, and a plain list of DNS records. Instead of hand-writing the fiddly SOA block and remembering which record types need trailing dots, priorities, or quotes, you fill in a few fields and get a ready-to-paste zone file. Everything runs in your browser — no DNS queries are made and nothing you type is sent to a server.

How to use it

  1. Enter your domain, primary nameserver, and admin email. The email can be written normally (admin@example.com) — it is automatically converted to the SOA RNAME form (admin.example.com.).
  2. Adjust the serial, default TTL, refresh, retry, expire, and minimum TTL if you need to. TTL fields accept plain seconds or shorthand like 1h, 1d, or 1w.
  3. In the DNS Records box, add one record per line using the format name [ttl] TYPE value:
    • @ A 192.0.2.1
    • www CNAME example.com
    • @ MX 10 mail.example.com (priority then target)
    • @ TXT v=spf1 include:_spf.example.com ~all
    • _sip._tcp SRV 10 5 5060 sip.example.com (priority weight port target)
    • @ CAA 0 issue letsencrypt.org (flags tag value)
    • @ 3600 NS ns1.example.com (optional per-record TTL after the name)
  4. Click Generate zone file, then copy or download the result as example.com.zone.

Supported record types are A, AAAA, CNAME, MX, TXT, NS, SRV, and CAA. Lines that start with ; are treated as comments and skipped, and hostnames are given fully-qualifying trailing dots automatically (@ is left as-is).

What is the SOA serial and how should I set it?

The serial is a version number for the zone. Secondary nameservers only pull an update when the serial increases, so you must bump it on every change. The common convention is YYYYMMDDnn (date plus a two-digit counter), for example 2024010101. This tool defaults to 1 so output stays predictable; set your own value before publishing.

Why do some names end in a dot?

A trailing dot marks a fully-qualified domain name. Without it, BIND appends the zone's $ORIGIN, so mail.example.com (no dot) would wrongly become mail.example.com.example.com. The generator adds trailing dots to CNAME, NS, MX, and SRV targets for you.

Does this look up or validate live DNS?

No. It only formats the text of a zone file from what you enter. It does not resolve records, check that a nameserver exists, or verify IP addresses. Use a DNS lookup or propagation tool for that.

Can I use TTL shorthand everywhere?

Yes — any TTL field and any per-record TTL accepts s, m, h, d, or w suffixes. 1h becomes 3600, 1d becomes 86400, and 2w becomes 1209600.

Privacy

This tool is fully client-side. Your domain, records, and email never leave your browser — there are no network requests, no logging, and no storage. You can generate zone files for internal or unpublished domains with confidence.

dnszone filebindsoadns recordsnameserver

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.