# DNS Zone File Record Builder

Build RFC 1035 DNS zone files (SOA + NS/A/AAAA/CNAME/MX/TXT/SRV/CAA/TLSA/NAPTR/DS) with per-record validation and a readable summary.

> Canonical page: https://elysiatools.com/en/tools/dns-zone-file-record-builder

- **Category:** Network

- **Keywords:** dns, zone file, bind, soa, ns, a, aaaa, cname, mx, txt, spf, dkim, dmarc, srv, caa, tlsa, naptr, ds, rfc 1035

## Overview

Build RFC-1035 DNS zone files record-by-record, without typos and without memorizing the field order of every record type.

**What it generates.** The full SOA record plus any combination of NS, A, AAAA, CNAME, MX, TXT (including SPF / DKIM / DMARC), SRV, CAA, TLSA, NAPTR, and DS records. Output is standard RFC 1035 master-file syntax — paste it straight into BIND, Knot, PowerDNS, NSD, or a hidden master.

**How to enter records.** Put one record per line in the **Records** box. Each line is a mini zone-file entry:
```
@           IN  A     203.0.113.10
www         IN  A     203.0.113.10
@           IN  MX    10 mail.example.com.
@           IN  TXT   "v=spf1 mx -all"
_dmarc      IN  TXT   "v=DMARC1; p=reject; rua=mailto:dmarc@example.com"
_sip._tcp   IN  SRV   10 60 5060 sip.example.com.
@           IN  CAA   0 issue "letsencrypt.org"
```
- The **name** field can be `@:` (zone origin), a relative name (`www` → `www.example.com.`), or a fully-qualified name ending in `.`.
- `TTL` is optional before `IN` (e.g. `www 3600 IN A ...`); if omitted, the zone default TTL applies.
- Quoted strings (TXT) preserve spaces; the tool keeps them intact.
- Lines starting with `;` are comments and pass through verbatim.

**Validation the tool does.**
- Detects obviously malformed IPv4 / IPv6 addresses (A / AAAA).
- Flags MX / SRV / NS target names missing the trailing dot.
- Warns on TXT records containing unescaped double-quotes.
- Catches CNAME co-existing with other records at the same name (RFC 1034 §3.6.2).
- Validates that DKIM/DMARC TXT values start with `v=DKIM1` / `v=DMARC1`.

**The SOA block.** Filled from the form fields above. Serial defaults to today's date in `YYYYMMDD01` format (the conventional "daily + revision" scheme). Refresh/Retry/Expire/Minimum use RFC 1912 recommended values by default.

**Why not just use a web panel?** Cloud / registrar panels rewrite your records, hide the TTL, and silently drop records they don't understand. For self-hosted DNS, migrations, audits, and "exactly what does my zone look like right now?" — a plain-text zone file is still the source of truth.

## Inputs

- **Zone origin (domain)** (text): e.g. example.com
- **Default TTL (seconds)** (number): e.g. 3600
- **Primary nameserver (FQDN)** (text): e.g. ns1.example.com
- **Admin email (hostmaster@...)** (text): e.g. hostmaster@example.com
- **Serial number** (text): e.g. 2026070801 (defaults to YYYYMMDD01)
- **Refresh (seconds)** (number)
- **Retry (seconds)** (number)
- **Expire (seconds)** (number)
- **Minimum / negative TTL (seconds)** (number)
- **Records (one per line)** (textarea): One record per line: name \[ttl\] IN TYPE rdata. @ = zone origin. Comments start with ;.

## When to use

- When setting up or migrating self-hosted DNS servers like BIND, Knot, or PowerDNS that require raw RFC 1035 zone files.
- When configuring complex mail authentication records like SPF, DKIM, and DMARC and wanting to validate their syntax before deployment.
- When auditing existing DNS records to catch common configuration errors such as missing trailing dots on FQDNs or CNAME record collisions.

## How it works

- Enter your zone parameters including the zone origin domain, primary nameserver, administrator email, and default TTL values.
- Input your DNS records line-by-line in the records text area using standard zone file syntax.
- Review the real-time validation warnings for malformed IP addresses, unescaped quotes, or invalid DKIM/DMARC prefixes.
- Copy the generated RFC 1035 compliant zone file output containing the formatted SOA block and validated records.

## Use cases

- Generating a clean BIND zone file with a correctly formatted SOA header and validated A/AAAA records.
- Staging and validating SPF, DKIM, and DMARC TXT records to prevent email delivery failures.
- Creating SRV and CAA records with correct field ordering and syntax validation for web services and SSL certificates.

## Frequently asked questions

### What DNS record types does this builder support?

It supports SOA, NS, A, AAAA, CNAME, MX, TXT, SRV, CAA, TLSA, NAPTR, and DS records.

### How does the tool handle the SOA serial number?

It defaults to the current date in YYYYMMDD01 format, but you can manually specify a custom serial number.

### Does the tool validate DKIM and DMARC records?

Yes, it checks that DKIM and DMARC TXT records begin with the correct 'v=DKIM1' and 'v=DMARC1' prefixes.

### What happens if I omit the trailing dot on an MX or NS target?

The validator flags the record and warns you that the target name is missing the required trailing dot.

### Can I define a CNAME alongside an A record for the same host?

No, the validator will flag this as an error because RFC 1034 prohibits CNAME records from co-existing with other records for the same name.

## Related tools

- [llms.txt / AI Crawler Audit Generator](https://elysiatools.com/en/tools/llms-txt-and-ai-crawler-audit): Generate an llms.txt file (llmstxt.org v2 format: H1, blockquote summary, H2 file lists) from a live site crawl or a pasted page inventory, and audit robots.txt policies for GPTBot, ClaudeBot, PerplexityBot and Bytespider using the RFC 9309 matching algorithm — with allow/block previews and ready-to-paste directives.
- [ECharts Theme Token Extractor](https://elysiatools.com/en/tools/echarts-theme-token-extractor): Extract design tokens — colors, numbers, font sizes and strings — from an ECharts theme JSON and export them straight into your design system. Paste a theme object (the kind registered via echarts.init(dom, themeName)) and the tool walks every leaf, tagging each color (with optional named/rgb → hex normalization), spacing number, font size and string, then emits clean CSS variables, a Tailwind theme.extend config, Style Dictionary tokens.json, or SCSS variables. Bridges the gap between an ECharts visualization theme and Figma/CSS/Tailwind design tokens without copying each value by hand.
- [Extended Text Base Codecs (Base65536 + netstring)](https://elysiatools.com/en/tools/extended-text-base-codecs): Encode and decode with less-common text codecs: Base65536 (binary → dense Unicode) and netstring (self-delimiting framing). Base85 is intentionally not rebuilt (already covered).
- [OCR PDF to Structured JSON Bridge](https://elysiatools.com/en/tools/ocr-pdf-to-structured-json-bridge): Extract the PDF text layer with geometry (lines by y-position, tables by column gaps, headings by font size, colon key-value pairs), then fill a user-supplied JSON Schema field by field — labels matched by normalized keys, values coerced to declared types and validated with ajv.
- [Twitter / X Thread Splitter](https://elysiatools.com/en/tools/twitter-thread-splitter): Paste a long text and split it into a numbered X thread that respects the 280-character limit. Splits on word/sentence/paragraph boundaries, auto-adds 1/N numbering, weighs CJK and full-width characters correctly, counts URLs as 23 characters, and shows a live X-style preview card for each tweet with a character meter.
- [AI Currency & Number Extractor (AI货币数字提取器)](https://elysiatools.com/en/tools/ai-currency-extractor): Use AI to intelligently extract numbers, currencies, and financial amounts from text with their original formatting preserved
- [Indented List to ASCII Tree](https://elysiatools.com/en/tools/ascii-tree-from-indented-list): Convert a 2-space / 4-space / Tab indented hierarchical list (Markdown bullets, -, *, 1. prefixes optional) into a copyable ASCII directory tree. Two styles: Unicode box-drawing (├──└──│) for GitHub/Discord and classic ASCII (|--\--|) for plain text. Toggles for full guide lines, trailing spaces, and bracketed leaf nodes like docs/\[api.md\].
- [Audio Read-Along Cue Generator](https://elysiatools.com/en/tools/audio-read-along-cue-generator): Generate sentence or word-level timestamp cues from a narration audio and its script, for karaoke-style reading and language learning.

## Samples

- [Time Zone Workflow Scheduler ICS Samples](https://elysiatools.com/en/samples/time-zone-workflow-scheduler-ics-samples): ICS files generated in the same structure returned by the Time Zone Workflow Scheduler, with multiple VEVENT meeting candidates exported from overlap windows
- [Copyright-Free MP3 Audio Samples](https://elysiatools.com/en/samples/mp3-samples): Collection of royalty-free audio samples for testing and development purposes including nature sounds, meditation music, and ambient audio
- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Android Image Processing Java Samples](https://elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
