Zones and zone files
The short version
- A zone is the part of the DNS tree that one set of nameservers is in charge of.
- A zone can be smaller than a domain, because a branch can be handed to someone else.
- A zone file is a plain-text list of the records in one zone.
- Most DNS hosts hide the file behind a form, but the same idea sits underneath.
A zone is a piece of the tree
The domain name chapter showed that names form a tree. A nameserver doesn't hold the whole tree. It holds some pieces and answers for those pieces only.
The standard has a word for such a piece. Information a nameserver can answer for with full authority is organised into units called zones.[1]
For a small site, one zone covers everything. The zone for example.com holds the records for example.com, www.example.com and mail.example.com.
A zone is not always a whole domain
Say you want a team to run dev.example.com on its own. You can give that branch away. In your zone you add NS records for dev. They name the servers that now answer for it.
From then on, dev.example.com is its own zone. It is still a subdomain of example.com. But your zone no longer holds its records.
You don't lose track of it. Your zone keeps the NS records, so the parent has what it needs to find the servers of its child zones.[1] The nameservers chapter explains how those handoffs work.
What a zone file is
Something has to store the records. Often it is a text file. The standard calls it a master file: a text file that holds records in text form.[2] Most often, it is used to define a zone.[2]
People call it a zone file. You have already seen its lines in this guide. Each line is one record, with a name, a TTL, a class, a type and a value.
www.example.com. 3600 IN A 192.0.2.1
Reading a zone file
Here is a small one. The text after a semicolon is a comment. The server ignores it.[2]
; one zone file
$ORIGIN example.com.
@ 3600 IN SOA ns1.example.com. admin.example.com. ( ... )
@ 3600 IN A 192.0.2.1
www 3600 IN A 192.0.2.1
Three bits of shorthand make it shorter.
$ORIGINsets the base name for the lines below it.@stands for that base name. The standard says a lone@means the current origin.[2]- Names without a final dot are relative. They get the base name added on the end.[2] So
wwwbecomeswww.example.com..
That last point trips people up. Write www.example.com with no final dot, and a zone file may read it as www.example.com.example.com.. The dot at the end marks a name as complete.
What every zone file needs
The standard says exactly one SOA record should sit at the top of the zone.[2] It holds the zone's housekeeping details. The SOA chapter goes through them.
After that come the records you choose: A, MX, TXT and the rest.
Do you ever see one?
Often not. Most DNS hosts show you a table with a Name box, a Type box and a Value box. Each row you add is one record in your zone.
When you read a record in a form, you now know where it lives: in the zone for your domain.
Next: checking what a zone says
Want to see the records a zone really gives out? The dig and nslookup chapter shows how.
Sources
- RFC 1034: Domain names - concepts and facilities, IETF (accessed 2026-11-02)
- RFC 1035: Domain names - implementation and specification, IETF (accessed 2026-11-02)