VOOZH about

URL: https://www.geeksforgeeks.org/computer-networks/domain-name-system-dns-zones/

⇱ Domain Name System (DNS) Zones - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Domain Name System (DNS) Zones

Last Updated : 17 Mar, 2025

A DNS zone is a specific portion of the Domain Name System (DNS) that is managed by a single authority. It is like a section of a big map, where each section is controlled separately to make management easier. This division allows different organizations or administrators to handle and update their own part of the DNS without affecting the entire system.

  • DNS zones follows a hierarchical concept. Therefore, namespace is subdivided into areas (zones) for this purpose. The purpose of DNS zones is to permit easier control over multiple levels of website.
  • As the number of resource records increases for single domain, it becomes complex to manage all of them. Network administrations moderate this issue by breaking down their configurations into multiple zones.
  • Root name servers are responsible for root zone. Each top-level domains
    (TLD) name server is responsible for zone covering its specific TLD, and authoritative name servers are responsible for some even smaller zones below that.
  • The root and TLD name servers are actually just authoritative name servers, but, zones that they're authoritative for are special cases.
  • DNS zones aren't necessarily physically separated from each other; zones are strictly used for delegating control.

Example

Imagine large tech company named “Dreamwave” that owns domain “www.dreamwave” with further 2 top-level domains(TLD) servers: www.dreamwave.com and www.dreamwave.org. This company has offices in Canada, India, and Japan. Let's say each office has around 1000 people with their own uniquely named desktop computer. This would be 3000 “A records” for both .com, .org TLD, and to keep track of if it was all configured as single zone. What corporate could do, instead, is break up each office into their own zone. So now, we could have ca.largecompany.com, in.largecompany.com, and jp.largecompany.com as subdomains, each with their own DNS zones. A total of four authoritative name servers would now be required for setup, one for dreamwave.com and one for each of subdomains, and similarly and total of four authoritative name servers for dreamwave.org.

👁 UntitledDiagram
Example: zone hierarchy of "Dreamwave" along with DNS nameservers

Zone files

A DNS zone file is a configuration file that stores important information about a DNS zone. It contains all the DNS records needed to manage that specific zone, helping DNS servers understand how to handle domain name requests.

Components of a DNS Zone File

1. SOA (Start of Authority) Record:

  • This is the most important record in the zone file.
  • It declares the DNS zone and specifies the authoritative name server responsible for it.

2. TTL (Time to Live):

  • Determines how long DNS records should be stored in the local DNS cache before they need to be refreshed.
  • Helps improve performance by reducing the number of requests to DNS servers.

3. NS (Name Server) Records:

  • These records list the other DNS servers responsible for managing the zone.
  • They help distribute the load and improve reliability.

Directives in a DNS Zone File

Directives are special instructions in a zone file that begin with a "$" symbol. There are three main directives:

  • $TTL – Sets the default Time to Live (TTL) for the entire zone. This must be at the top of the zone file, before the SOA record.
  • $ORIGIN – Defines the base domain name used in the zone file. This helps shorten DNS entries by avoiding repetition.
  • $INCLUDE – Allows additional files to be included in the zone file, keeping things organized.

Reverse Lookup Zone

A reverse lookup zone contains mapping from an IP address to host (opposite function of most DNS zones). These zones are used for troubleshooting, spam filtering, and bot detection. Just like how subdomains can go many layers deep, zones are often constructed to have many layers too, a bit like subdomains, although it's rare to see certain zones deeper than just few levels.

Comment
Article Tags:

Explore