Zone Files

DNS Check can import and export DNS records from zone files. This page covers what zone files are, and how the export and import options work.

What Is a Zone File?

A zone file is a plain text file that describes a DNS zone: the set of DNS records for a domain and its subdomains. Zone files follow a standard format (RFC 1035) that most DNS servers, like BIND, and many DNS hosting providers understand. Here's an example:

$ORIGIN example.com.
@      NS  ns1.isp.com.
@      NS  ns2.isp.com.

@      A   192.168.0.2
mail   A   192.168.0.3

@      MX  10 mail.example.com.

Each line describes one DNS record. The $ORIGIN directive sets the domain name that's appended to any record names in the file that aren't fully qualified (don't end in a dot). In the example above, mail expands to mail.example.com, while @ refers to the origin itself (example.com).

Because a zone file is just text, you can move a set of DNS records between systems in one step instead of re-entering each one by hand.

Zone Files vs. Record Groups

DNS Check organizes the records it monitors into DNS record groups rather than zone files. A zone file conventionally holds every record for a single domain. A record group is more flexible: it can cover one domain, several domains, or just a subset of a domain's records. Importing and exporting move records between the standard zone file format and a record group.

Exporting a Zone File

To export a record group's DNS records as a zone file, open the DNS record group and click the Export zone file button. DNS Check renders the group's records as zone file text you can copy.

The export separates records into two sections, because they're often managed in different places:

Each section has its own Copy button so you can paste the relevant records wherever they belong.

Records that don't fit standard syntax

Some of DNS Check's record types can't be expressed in standard zone file syntax. Rather than dropping them, DNS Check writes them at the end of the file as comments (lines beginning with ;). Standard DNS servers ignore comments, so the exported file is still a valid zone file, and DNS Check can read the comments back to restore those records on import. The record types handled this way are:

Importing a Zone File

To add many DNS records at once, import them from a zone file. Open the DNS record group, click the Import zone file button, and provide your zone file in one of two ways:

When you click Import, DNS Check parses the zone file and creates a DNS record for each entry. Standard zone file format (RFC 1035) is supported, along with the non-standard record types DNS Check exports as comments, so a file exported from DNS Check round-trips back into an identical set of records.

Supported records

Import options

The import form offers a few options:

$ORIGIN

If your zone file defines an $ORIGIN, DNS Check uses it to expand relative record names. If no $ORIGIN is defined, the default origin is . (the DNS root), which means record names are treated as already fully qualified. With autocorrect enabled, DNS Check also tries to infer the origin from the file when it isn't stated.

Reverse DNS shorthand

When importing, DNS Check accepts a shorthand for reverse DNS that lets you work with IP addresses directly instead of hand-writing PTR record names:

Both IPv4 and IPv6 addresses are supported. See the FAQ for more on importing reverse DNS records as IP addresses.

Round-Tripping Records

Because DNS Check preserves its non-standard record types as comments on export and reads them back on import, you can export a record group and import the result into another group (or back into the same one) to reproduce the original records, including load balancer, inverted, wildcard-value, and ALIAS records. Export then import is a straightforward way to clone or back up a record group.

To learn more about adding and monitoring DNS records, see the Monitor DNS Records page.

Additional Resources


DNS monitoring illustration

Protect your DNS infrastructure with automated monitoring

Get notified immediately when DNS records change. Start monitoring your critical DNS infrastructure for free in under 5 minutes.

No credit card required • Cancel anytime