constellix background

DNS Zone Files

DNS Provider Resource
Constellix DNS LogoCompare DNS Providers - Alternative Comparison Free Demo


Resources:

Subnet Mask Cheat SheetRecords Cheat SheetGeoDNS ExplainedFree Network TroubleshooterKnowledge BasePricing CalculatorLive CDN PerformanceVideo DemosOutage Prevention - CDN Outage - DDos Attack Prevention - DNS Outage


Categories:

BlogsNewsPress ReleasesIT NewsTutorials
Book a Free Demo →

Want DNS Freebies?

Give us your email and we'll send you the good stuff.

Thanks for joining our newsletter.
Oops! Something went wrong.
Enterprise DNS



Categories:

Tanya Valdez is a Technical Writer at Constellix. She makes the information-transfer material digestible through her own transfer of information to our customers and readers. Connect with her on LinkedIn.

Connect with
LinkedIn

http://www.linkedin.com/in/tanya-valdez

What is a DNS Zone File

It is most certainly not the answer-in-the-form-of-a-question that you would be hearing in a game of Jeopardy. A DNS zone file is a fundamental part of DNS and how domains operate on the internet. DNS consists of domains within the DNS namespace. There are also DNS zones, which are the physical location in which the information is stored. DNS zone files are text-based files that describe a zone (which is typically a single domain) and contain the contents of a DNS cache. They are the binding between domain names, IP addresses, and related sources.

The DNS Zone file hosts all of the records for the zone that are stored on the DNS server and are used by the authoritative nameserver to perform DNS lookups for the domain. They are managed by the organization’s administrator. Essentially, it is an administrative space within the DNS environment that defines procedures for proper operations in relation to the domain. 

DNS Zone Types

There are different types of DNS Zones. 

  • Primary Zone: Referred to as the main zone that contains the read/write copy of the data 
  • Secondary Zone: Holds a read-only copy of the primary zone information. It cannot perform updates and can only receive them from the primary zone. It can, however, perform as an authoritative zone to alleviate some workload from the primary. 
  • Stub Zone: Operates similarly to a secondary zone but only stores partial data to reduce zone transfers. Instead, it passes the requests to authoritative servers.
  • Forward Lookup Zone: Provides the IP address resolution with the hostname’s IP information
  • Reverse Lookup Zone:  Resolves IP addresses into hostnames

DNS Zone File Example

DNS zone files include directives that tell the nameserver what tasks to perform. They can also store special settings to apply to the zone. A $ symbol is used to indicate the beginning of a directive. 

Each zone file begins with the Time to Live (TTL) to specify how long the records will be kept on the server’s cache. The zone file also includes a Start of Authority (SOA) record, which shares the administrative information about the zone, such as its name, serial number, and e-mail address of the administrator. All records that have been configured in the DNS management portal are stored on the server. They further define the domain and dictate actions that the server needs to take according to the rules set in the record. 

Tip: See our DNS Record Types Cheat Sheet for a downloadable resource of the most common record types and their purpose.  

Here is an example of what the beginning of a DNS zone file would look like:

DNS Zone File Example


The information below this point would include the nameservers and mail servers for the domain and any configured records. 

DNS Zone File Directives

There are three directives:

  • $TTL - defines the time to live value for the zone
  • $ORIGIN - defines the base name for unqualified records. These are any names that are used in resource records that do not end with a trailing period (e.g.: domain.com.) and are appended to the base name using this directive.
  • $INCLUDE - allows inclusions of other zone files within an existing zone file to allow for additional settings to be stored that are not part of the file. This can be used to keep each subdomain’s records in separate files.
    Example: $ORIGIN example.com. $INCLUDE db.example.com

DNS Zone File Key Points   

DNS zone files are stored on the DNS server and are used by the authoritative nameserver to perform DNS lookups for the domain. They hold pertinent information about the zone, such as configured records that direct how to handle incoming requests. These files also include zone file directives, such as $TTL and $ORIGIN which define the time to live and the base name for unqualified records. The contents are maintained by the domain’s administrator and all of their contact information is listed within the file.

For more information about our products and services, see our library of resources

Related reads:

https://constellix.com/news/what-is-primary-dns

https://constellix.com/news/what-is-time-to-live-ttl

https://constellix.com/news/secondary-dns-myths

Simplify & automate your DNS management.

Learn how we can help with a customized demo.

Get Started
pie diagram dnsdns graph

Constellix DNS News

dns zone, dns zone file, dns zone file example, dns example, dns zone types

Sign up for industry news and insights. It'll be worth it.

Sign up for news and offers from Constellix and DNS Made Easy

Thanks for joining our newsletter.
Oops! Something went wrong.