Skip to content
toolstome

DNS record generator (zone file format)

Fill in a few fields and get DNS records written correctly in the standard zone-file format that BIND, PowerDNS, Cloudflare and most DNS hosts can import. The generator adds the trailing dot to target host names so they aren't read as relative to your zone, splits long TXT values such as DKIM keys into 255-byte strings, and stops you from making records that will not work: a CNAME at the zone apex, an SRV record without _service._protocol in its name, an MX without a preference, or an AAAA record holding an IPv4 address.

Free · No sign-upProcessed in your browser

Adds $ORIGIN and $TTL lines so the file can be imported directly.

  1. Enter a value. That isn't a valid IPv4 address.

  2. Enter a value.

Only valid rows are included. Most DNS hosts can import this file; some ask you to paste records one by one.

How to use the DNS Record Generator

  1. 1

    Enter your domain (optional)

    Adds a $ORIGIN line so the file can be imported as is.

  2. 2

    Add records

    Use the buttons to add A, AAAA, CNAME, MX, TXT, SRV or CAA rows, then fill in the name, TTL and value.

  3. 3

    Fix any warnings

    Each row shows the finished line, or what is wrong with it.

  4. 4

    Copy or download

    Copy the zone file or download it as a .zone file to import into your DNS host.

Zone file syntax

Each record is one line: name, TTL in seconds, class IN, type and the record data (RFC 1035 §5). A name ending in a dot is absolute; anything else is relative to $ORIGIN, and @ stands for the zone itself.

TXT data is stored as one or more strings of at most 255 bytes each (RFC 1035 §3.3.14). Resolvers join them back together, so a 400-byte DKIM key is written as two quoted strings on the same line.

  • @ 3600 IN MX 10 mail.example.com.
  • _sip._tcp 3600 IN SRV 10 60 5060 sip.example.com.
  • @ 3600 IN CAA 0 issue "letsencrypt.org"

When to use it

  • Prepare records to paste into a DNS host's import screen when moving a domain.
  • Write SRV records for VoIP, Microsoft 365 or game servers without syntax errors.
  • Add CAA records that limit which certificate authorities may issue for your domain.
  • Split a long DKIM public key into valid TXT strings.

Limits

  • SOA, DNSSEC and less common record types are not included; DNS hosts create the SOA and DNSSEC records themselves.
  • Internationalised names must be entered in their xn-- (Punycode) form.
  • The generator checks syntax, not whether the target servers exist.

Privacy

Records are built in your browser and nothing is sent to any DNS server.

Frequently asked questions

Why do host names end with a dot?

In a zone file, a name without a trailing dot is relative to the zone, so mail.example.com would become mail.example.com.example.com. The dot makes it absolute; the generator adds it for you.

Why can't I put a CNAME on my root domain?

A CNAME means 'this name is an alias' and can't share the name with other records, but the zone apex always has SOA and NS records (RFC 1034 §3.6.2). Use an A/AAAA record, or your DNS host's ALIAS/flattening feature.

What TTL should I use?

3600 seconds (one hour) is a common default. Lower it to 300 a day before you change a record so the change spreads faster, then raise it again.

How do I write a long TXT record such as a DKIM key?

Paste the whole value. The generator splits it into quoted strings of up to 255 bytes on one line, which is the standard way to store values longer than one string.

What does a CAA record do?

It lists which certificate authorities may issue certificates for your domain (RFC 8659). For example 0 issue "letsencrypt.org" allows only Let's Encrypt; an iodef record gives an address for violation reports.

What is the SRV record format?

_service._protocol.name TTL IN SRV priority weight port target, for example _sip._tcp 3600 IN SRV 10 60 5060 sip.example.com. (RFC 2782). Lower priority is tried first; weight shares load between equal priorities.

What is a null MX?

An MX record with preference 0 and target '.' (RFC 7505). It tells senders that the domain doesn't accept email, so they fail immediately instead of retrying.

People also use

Last updated November 29, 2026 · How we build and test our tools

Categories

Recently used tools

Tools you open will appear here.

More