DNS Zones and DNS Zone Files can be a confusing matter for people who have just started administrating their Websites or Web Applications
but are concepts which are extremely important and valuable to understand.
As you might already know the Core Purpose of the DNS is to perform DNS Lookup
i.e. Resolve the Domain Name and send the IP Address associated with the Domain Name back to the requester.
I have already explained the whole process of how DNS Resolution is performed in the article on IP Address and DNS (Domain Name System).
Now to understand this further from the Website Administration side,
you need to understand what DNS Zones, DNS Zone Files and DNS Records are.
In this Article, we will be talking about and overviewing
- Fundamentals of DNS Zones
- Then we will understand DNS Root Zones, DNS TLD Zones and DNS Domain Zones with an Illustration
- After that we will look at – What are DNS Zone Files?
- And Finally, we will look at the Structure of DNS Zone Files
to understand these concepts and their uses in managing your Websites and Web Applications.
Then in the next article we will look into DNS Record and Types of DNS Records
to build upon the knowledge that we gather in this article.
So, without further ado, let’s get started!
This Article is part of 3 part article series on DNS (Domain Name System)
IP Address and DNS (Domain Name System)
DNS Zones and DNS Zone Files <— You’re Currently Here 😛
DNS Records and Types of DNS Records
Fundamentals of DNS Zones
First of all let’s understand DNS Zones.
You can consider DNS Zones as portions of the DNS Namespace which can be managed by specific organizations or administrators.
A DNS Zone allow these administrators to have specific and granular control over
the DNS Components like IPv4 and IPv6 Address of that DNS Zone and how DNS queries will resolved.
For a DNS Zone to be made you need at least one Domain but it can contain more than one domain if you so wish.
So basically, DNS Zones are portions of the DNS Namespace which can have different Components and Settings.
UNDERSTANDING DNS ZONES WITH AN ILLUSTRATION
To understand DNS Zones further, take a look at the image below
Here as you can see in the middle we have the Fully Qualified Domain Name (FQDN) a.k.a. Absolute Domain Name
which basically specifies the exact location of the domain name in the Tree Hierarchy of the DNS (Domain Name System).
What’s important here is the final Full Stop, Period, Dot (.) in the FQDN which represents the DNS Root Zone.
Examples :
- www.youtube.com.
- bitesizedtech.com.
- en.wikipedia.org.
DNS Root Zone – Root Name Servers
Any Recursive DNS Query starts by contacting the Root Nameserver (.) which contains the DNS Root Zone Settings
to find the details regarding the TLD Server which contain the TLD Zone Setting required for the DNS Query.
The DNS Root Nameserver themselves don’t know anything details about the solution of the DNS Query
but it know where you can go to solve it, which means that it can send us in the right direction
and that is literally what it is doing.
The DNS Root Zone is overseen by ICANN – Internet Corporation for Assigned Names and Numbers
and is managed by IANA – Internet Assigned Numbers Authority
and is operated by logical servers run by organizations like
- NASA (Ames Research Center)
- Verisign Inc.
- University of South California, Information Sciences Institute
- Cogent Communications
- University of Maryland
- Internet Systems Consortium Inc.
- US Department of Defense (NIC)
- US Army (Research Labs)
- Netnod
- RIPE NCC
- ICANN
- WIDE Project
DNS TLD Zones – TLD Name Servers
As we move forward with the Recursive DNS Query, we will need the details for the Authoritative Nameserver
which contain information about Domain Zone for the Queried domain
To get this we will need to query the TLD Nameserver whose information we just got from the Root Nameserver.
Again, just like Root Nameserver,
TLD Nameserver does not know the solution but is pointing us to the right direction.
TLD means Top Level Domain and is represented by .com , .org , .tech etc as highlighted below
Examples – www.youtube.com. , bitesizedtech.com. , en.wikipedia.org.
There are currently over 1500 Top Level Domains most of which are managed by ICANN and IANA.
DNS Domain Zones – Authoritative Nameserver
After we get information stored within the TLD Zone,
the Recursive DNS Query will move forward and query the Authoritative Name Server a.k.a. Authoritative DNS Server
for the IP Address which we require and send it back to the requester.
Authoritative Name Servers store all information related to the domain name in question like IP Address, MX Records, etc,
we will talk more about these DNS Records in the upcoming article.
Second-level Domain like – ‘bitesizedtech.com’ have their own separate DNS Zones,
operated by the owners or managers of the said domain.
If we have Subdomains like – ‘en.wikipedia.org’
the managers can decide to have it as part of the same Domain Zone as – wikipedia.org
or if they consider en.wikipedia.org as a separate website
then they can create a separate DNS Zone for it.
What are DNS Zone Files?
DNS Zone Files are Text based Files which contains information in form of Resource Records (RR)
regarding Domain Names, IP Address, MX Records, and other resources which are part of the DNS Zone in question.
DNS Zone Files are stored on a DNS Name Server.
There are 2 Types of DNS Zone Files
- DNS Primary File – It is the Main File where the managers will define the DNS Zone
- DNS Cache File – It lists the contents of a DNS cache and is only a copy of the Authoritative DNS Zone
Each line in a DNS Zone File represents an DNS Resource Record.
Structure of DNS Zone Files
A DNS Zone File Starts with 2 mandatory records
- Global Time To Live (TTL) – Global setting on how long records will be kept in DNS Cache if not explicitly specified.
- SOA (Start Of Authority) Record – Specifies the primary Authoritative Nameserver for the DNS Zone.
Global TTL represented by ($TTL) must be specified before specifying the SOA Record.
Most DNS Zone Files also starts with $ORIGIN directive at the top of the file which defines the base name
from which ‘Unqualified Names‘ or ‘@‘ substitutions are made when the zone file is processed.
Unqualified Names are those Names which do not have a terminating dot i.e. a full stop at the end of the name.
@ symbol is a special Hostname Label (Identifier of a DNS Record) which indicates that we should replace ‘@’ with the contents of $ORIGIN
After these mandatory records, we can start adding the other resource records that we need or want to add.
A DNS Resource Record is made up of 5 parts
- Hostname Label – Identifier of the this DNS Record
- TTL (Time To Live) – Indicates how long the DNS Record should be kept in the DNS Cache. if not specified Global TTL is used.
- Record Class – Indicates the Namespace of the DNS Record like IN (Internet), CH(Chaosnet) or HS (Hesiod).
- Record Type – Indicates the DNS Record Type like A, AAAA, CNAME, MX, etc
- Record Data – Contains the Data of the DNS Record.
We will go in more details about the DNS Records and it’s Types in the next article.
Finally, just so you know what a DNS Zone File looks like, here’s an example.
$ORIGIN exampledomain.com. ; Start of the Zone File
$TTL 30m ; DNS Cache Global Time To Live for resource records
exampledomain.com. IN SOA ns.exampledomain.com. root.exampledomain.com. (
189620508 ; serial number of this zone file
1d ; time-to-refresh (d = Days)
1d ; time-to-retry
4w ; time-to-expire (w = Weeks)
1h ) ; minimum-TTL (h = Hours)
exampledomain.com. NS dns1.dnsprovider.com. ; Name Server 1
exampledomain.com. NS dns2.dnsprovider.com. ; Name Server 2
exampledomain.com. MX 10 mx1.dnsprovider.com ; Mail Server 1
exampledomain.com. MX 10 mx2.dnsprovider.com ; Mail Server 2
exampledomain.com. A 192.168.100.1 ; Root Domain IP Address
www A 192.168.100.1 ; WWW subdomain IP Address
This Article is part of 3 part article series on DNS (Domain Name System)
IP Address and DNS (Domain Name System)
DNS Zones and DNS Zone Files <— You’re Currently Here 😛
DNS Records and Types of DNS Records
Conclusion
Well Folks! That does it for this article on DNS Records and I hope you found this information helpful.
May you have success in your career whatever it may be and see you again in the upcoming articles.
Share this post on Social Media platforms, if you think our content is great.
If you like the content and would like to follow us, we are present on the platforms below
Follow Us On Social Media
Goodbye For Now,
This is your host VP
Signing Off.
Articles In WordPress Tutorial For Beginners Series
Develop WordPress Websites locally on your computer using XAMPP Server Stack
Articles In Basics Of Internet Series
Basics Of Websites & How They Work
Basics Of Web Servers | Self Hosted, Shared Hosted, VPS, Dedicated Web Servers
Cloud Hosting Vs Traditional Web Hosting
Articles In Web Development Basics Series
Virtualization, Hypervisors & Virtual Machines (VM)
IP Address and DNS (Domain Name System)
DNS Records | A, AAAA, CNAME, MX, TXT, NS, SOA, SRV, PTR & CAA Records
Articles In Monetizing Websites Series
Understanding Audience Intent Of Your Blog Traffic
Building a Monetization Strategy (Not Uploaded)
Digital Marketing Revenue Models – CPM, CPC, CPA, CPL & CPI
Affiliate Marketing & Monetizing Your Blog Using It. (Not Uploaded)
How is your Ad Inventory Auctioned (Not Uploaded)
Affiliate Marketing and Why it Works. (Not Uploaded)