DNS Zone File Generator
Draft a BIND or provider-ready DNS zone file with normalized records, SOA and TTL checks, plus mail and DNSSEC review warnings.{{ summaryTitle }}
{{ summaryLine }}
{{ primaryCopyAnnouncement }}
{{ artifacts.zone_text }}
The chart renderer is unavailable. Record counts remain available in the ledger.
| Kind | Item | Status | Detail | Next action | Copy |
|---|---|---|---|---|---|
| {{ row.kind }} | {{ row.item }} | {{ row.status }} | {{ row.detail }} | {{ row.action }} |
A DNS zone is the authoritative record set for one part of the domain namespace. Its records connect names to addresses, mail exchangers, aliases, verification text, service endpoints, and DNSSEC data. A zone file is one way to express that set for an authoritative server or a provider import.
Each resource record combines an owner name, time to live (TTL), class, type, and type-specific data. Relative names are interpreted beneath the zone origin, while a trailing dot marks an absolute name. Missing that distinction can quietly turn mail.example.com into mail.example.com.example.com.
- SOA record
- Identifies the primary authority, responsible mailbox, zone serial, refresh and retry timing, expiry interval, and negative-cache TTL.
- NS records
- Name the authoritative servers. Parent delegation and any required glue must agree with the final zone.
- Zone serial
- Versions the zone for secondary servers. It must change when a BIND-style master zone changes.
- TTL
- Controls how long cached answers may remain in use. Short TTLs can speed a planned change, but they do not repair inconsistent authoritative data.
Provider imports are not identical to BIND master files. Managed DNS services commonly control the SOA record themselves, so an import draft may omit SOA even though the logical zone still has one. DNSSEC is also a separate operational process: placing DNSSEC records in a draft does not sign the zone, publish the parent DS record, or prove the live chain validates.
A generated zone should therefore be treated as a reviewable draft. Syntax checks, provider previews, comparison with the existing record set, and live authoritative queries each catch a different class of error. Delegation changes and low-TTL rollouts still need a rollback plan.
How to Use This Tool:
Choose the deployment target first because it determines whether SOA data belongs in the output and which checks matter before publication.
- Select BIND master file or a provider import target, then choose the public, mail-ready, split-horizon, or migration profile that matches the zone's role.
- Enter the bare zone domain, default TTL, primary nameserver, responsible mailbox, serial strategy, authoritative nameservers, and optional mail exchangers.
- Choose the narrowest Record family and DNSSEC readiness mode that covers the intended records. Enter resource rows as CSV using owner, type, value, optional TTL, and optional priority.
- Review the advanced TTL policy and SOA refresh, retry, expire, and minimum values. BIND output needs an explicit serial; provider-managed serials are valid only for provider import targets.
- Resolve every blocking input issue, then inspect the zone text and audit findings. Warnings identify operational gaps such as missing address records, a single nameserver, or incomplete mail and DNSSEC data.
- Validate the saved artifact with
named-checkzonefor BIND or the receiving provider's import preview. Compare the live authoritative answers after publication.
Interpreting Results:
Zone draft ready to lint means the local normalization and validation rules passed without a review warning. It is not confirmation that an authoritative server or provider accepts the file.
- The Zone File is the generated artifact. In provider modes it omits SOA and reports that authority data as provider-managed.
- RR Mix counts emitted records by type. Use it to catch an unexpectedly empty or unbalanced draft, not as a quality score.
- The Audit separates blocking errors from review warnings and normalization notes. Resolve a blocking error before trusting any output.
- After publication, compare complete record sets across every authoritative server. Matching serials alone do not prove that every intended record is present.
Technical Details:
Zone generation normalizes the origin and record names before it renders master-file text. Relative record targets are expanded beneath the origin, absolute targets retain their trailing dot, and the responsible mailbox can be converted from email form to SOA RNAME form.
Transformation Core:
- Normalize the zone origin and validate DNS labels.
- Resolve the selected serial strategy and apply any TTL floor.
- Normalize SOA, NS, and MX data, then parse each resource-record CSV row.
- Validate type-specific values, remove exact duplicate resource rows, and test cross-record constraints.
- Render
$ORIGIN,$TTL, optional SOA, then NS, MX, and remaining resource records. - Project the same normalized record set into counts and audit findings.
Formula Core:
The provider-floor policy raises an entered TTL below 300 seconds; the other policies leave the entered value unchanged.
For the UTC date-plus-revision strategy, an eight-digit date and a two-digit revision form a conventional ten-digit serial.
For example, date digits 20260901 and revision 3 produce serial 2026090103. All explicit serials must contain digits and fit within the unsigned 32-bit maximum of 4,294,967,295.
Rule Core:
| Area | Blocking rule | Review signal |
|---|---|---|
| Names | Owners must stay inside the zone and use valid labels. A or AAAA data must be a valid address. | In-zone NS or MX targets without an A or AAAA record are flagged. |
| CNAME | A CNAME cannot coexist with another record at the same owner, and the zone apex cannot be a CNAME. | None; these conflicts block output. |
| Authority | At least one authoritative nameserver is required. | Public zones with one NS, or a primary NS absent from the NS list, are flagged. |
| SOA timing | Values must be whole seconds from 0 through 2,147,483,647. | Retry not shorter than refresh, or expire not greater than refresh, is flagged. |
| Mail-ready profile | Entered MX rows must have a priority from 0 through 65,535 and a valid target. | Missing apex MX, SPF TXT, or _dmarc TXT records are flagged. |
| DNSSEC | DNSSEC record types are accepted only by the relevant family or readiness mode. | Signed import checks for DNSKEY, RRSIG, and NSEC or NSEC3; parent handoff checks for DS, CDS, or CDNSKEY. |
| Raw import | Each row still needs owner, type, and non-empty record data. | Unknown record types are preserved without type-specific validation. |
Standard record families accept A, AAAA, CAA, CNAME, MX, NS, SRV, and TXT. The service family adds HTTPS, NAPTR, SSHFP, SVCB, TLSA, and URI. DNSSEC modes add CDNSKEY, CDS, DNSKEY, DS, NSEC, NSEC3, NSEC3PARAM, and RRSIG. TXT data is escaped and split into quoted chunks of up to 240 characters for readable master-file output.
Limitations and Accuracy Notes:
Local validation catches supported syntax and cross-record problems, but it cannot reproduce every authoritative server, provider importer, registry, or resolver policy.
- Provider modes are drafts. Confirm how the destination manages apex SOA and NS records, unsupported directives, aliases, and DNSSEC data.
- Raw import preserves unfamiliar record data with limited validation. Check that data against the receiving platform and the record type's specification.
- Signer-ready and signed-import modes do not sign a zone or validate a live DNSSEC chain.
- Split-horizon zones require checks from the intended resolver view. Public queries cannot prove private-view behavior.
- No local warning proves that delegation, glue, transfers, firewall access, or cached resolver answers are correct.
Worked Examples:
BIND authoritative draft
A public zone for example.com with two nameservers, serial 2026090101, and a 3,600-second default TTL emits $ORIGIN, $TTL, SOA, NS, MX, and entered resource records. Save the text and run named-checkzone example.com zonefile before loading it.
Provider mail-zone import
Choosing a provider import and the mail-ready profile omits SOA from the artifact. If the record set has an MX entry but no apex SPF TXT or _dmarc policy, the draft remains usable for review but reports those missing mail-policy records before publication.
References:
- RFC 1035: Domain Names - Implementation and Specification, IETF, November 1987.
- RFC 2308: Negative Caching of DNS Queries, IETF, March 1998.
- RFC 4033: DNS Security Introduction and Requirements, IETF, March 2005.
- BIND 9 named-checkzone reference, Internet Systems Consortium.
- How to check SOA serial numbers with dig, Simplified Guide.
- How to verify a DNS change with dig, Simplified Guide.