Glossary · DNS

DNS Zone File

A DNS zone file is a text file listing every resource record in a zone, beginning with an SOA record, which authoritative servers load to answer queries.

Updated October 6, 2026

A DNS zone file is a text file in standard master-file format that holds all resource records for one zone: the SOA, the NS records, and every A, MX, TXT and other record under that name. Authoritative servers such as BIND or NSD load it and answer queries from it.

Why it matters

The zone file is the source of truth for a domain. Many hosted DNS providers hide it behind a web form, but exporting and importing zone files is how you migrate providers, back up your DNS or review it for mistakes. A typo here, such as a missing trailing dot, changes what every user resolves.

Example

$ORIGIN example.com.
$TTL 3600
@    IN SOA ns1.example.com. admin.example.com. (
         2026100501 7200 3600 1209600 300 )
@    IN NS  ns1.example.com.
@    IN A   203.0.113.10
www  IN CNAME example.com.
@    IN MX  10 mail.example.com.

The serial 2026100501 must increase on every change so secondaries notice the update.

Common mistakes

  • Leaving off the trailing dot on a fully qualified name, so mail.example.com becomes mail.example.com.example.com..
  • Forgetting to increment the SOA serial.
  • Putting a CNAME at the apex next to the SOA and NS records, which is not allowed.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.