Understanding DNS Resource Records

Isaac Maposa Avatar
domain registration

By now most of us have heard and probably used the term DNS before, so this explanation is only supposed to help make some things clearer and bring other less known aspects into perspective.

The Domain Name System (DNS) is a hierarchical distributed database that contains resource records in the zone files within its DNS servers. A zone is a part of the DNS name space that is authoritative to answering queries of a particular namespace for the hosts contained in that namespace.

As I mentioned in my previous article, I will be explaining on the most common used DNS resource records that are used in mapping domain names.

The zone contains zone files that contain the resource records for which a DNS server in that zone is authoritative for and some of the DNS records contained are as follows;

Start of Authority (SOA) Record

At the beginning of every zone is the SOA record which identifies the start of a zone of authority. Every zone contains only one SOA record.

example.com. 4 IN SOA  sns.dns.icann.org.

noc.dns.icann.org.
015060375 ; serial
7200       ; refresh (2 hours)
3600       ; retry (1 hour)
1209600    ; expire (2 weeks)
3600       ; minimum (1 hour)

The SOA record entails the following components;

Primary DNS name server

This is the DNS server authoritative for that zone. e.g. sns.dns.icann.org as above.

Email address

This is the email address for the administrator responsible for that zone e.g noc.dns.icann.org. Note that there is no @ within the email address (noc@) as it is substituted by “.” (noc.)

Refresh interval

This is the time taken by the secondary server to check if there are any changes on the primary zone.

Time to Live (TTL)

This is the time allowed for the other DNS servers to cache data.

Time of expiry

It shows how long the secondary zone should keep its records after a zone transfer.

Serial number

This shows how many times the records have been changed and is used by the secondary server to check if the records are changed by comparing the serial number to that of the primary server. The serial number increases every time it’s updated. The incremental change to the serial number signals a change to the secondary name servers and this initiates a zone transfer (downloading a copy of the zone information from primary server).

Retry interval

It shows how long after sending a zone transfer request the secondary server for the zone waits for a response from the master server before retrying.

“A”/ “AAAA” records

An “A” record is used to map domain names to IP addresses. An “A” record maps domain names to IPV4 addresses (32 bits long), while the “AAAA” record maps domain names to IPV6 addresses (128 bits long).

example.com. 4 IN    A     93.184.216.34

example.com. 4 IN AAAA 2606:2800:220:1:248:1893:25c8:1946

CNAME (Canonical Name) Record

The CNAME record is used as an alias (synonymous name) to a domain name e.g www.isaacmaposa.co.zw can be an alias to isaacmaposa.com. so when a customer types in www.isaacmaposa.co.zw s/he is taken to isaacmaposa.com. So the CNAME www.isaacmaposa.co.zw can be used to direct traffic to isaacmaposa.com. A CNAME resolves to another domain which will have to resolve to an IP address.

NS Record

The NS records specifies the name servers responsible for answering queries of a particular DNS zone.

example.com. 4 IN NS a.iana-servers.net.

MX Record

The MX record specifies the mail server responsible for handling the emails of a particular domain name. For example the mail server mx.isaacmaposa.com may be handling the emails for the domain isaacmaposa.com. You can have multiple mail servers for a single domain so that when one mail server is down the emails are handled by another mail server.

TXT Record

TXT records provides general textual information that makes it possible to associate the textual information to a domain. TXT records can be used on;

SPF record

This allows the domain owner to specify email sending policy for the purpose of eliminating forged/ fake email addresses.

DKIM (Domain Keys Identified Mail)

It is used to authenticate messages by checking if the message was not altered during transit.

SRV (Service) Record

This is the record that is used to specify services on a domain for example File Transfer Protocol (ftp) and http services.
PTR (Pointer) Record

It maps an IP address to a Fully Qualified Domain Name/ host name, it works the opposite way as the “A” record works

3 comments

  1. cool

    yawn, we knw about this. sorry

    1. macd chip

      but then there are people who did not know about it depending on the profession they are in. Or maybe someone who is just starting their road in IT

    2. Stanley

      This is the problem with egocentric people like yourself.The continent never makes progress because you destroy what others are trying to build.

2023 © Techzim All rights reserved. Hosted By Cloud Unboxed