A domain name system, DNS, is responsible for making internet addresses human-readable hostnames to the internet protocol addresses. For example, when we access google.com, we are referred to some IP address by the computer, but ‘google.com’ is the DNS, making it human-readable.
An Internet Protocol address is a combination of integer values separated by dots for example 70.89.12.21 and this refers to a unique address over the internet the human-readable hostnames are a combination of strings and they are easy to remember and are mapped to the IP address.
For example: Let’s assume that Google’s IP address is 70.89.12.21, then the domain ‘google.com’ is mapped with IP address 70.89.12.21.
This article will discuss various DNS records and their types and how they work with examples.
What are DNS records Types?
DNS (Domain Name System) records are instructions within the DNS servers that map domain names to IP addresses and manage different aspects of domain functionality.
Here are the common types of DNS records:
DNS record types:
There are several types of DNS but throughout this article, we will focus on the major 5 DNS types:
A record
AAAA record
CNAME record
Nameserver (NS) record
Mail exchange (MX) record
Let’s discuss and understand each of these record types one by one
A Records :
A Records are one of the important DNS types, A in A Records stands for address, and these DNS records are used for mapping the IPV4 address to a domain (human-readable hostname).
For example: Let’s say we have to visit our friend Rajesh and his address is 123/54 Vimla Nagar, Nirmal Pradesh. Instead of asking for his actual address which is 123/54 Vimla Nagar, we can ask where is Rajesh’s Home in his locality. In this analogy the key i.e. Rajesh’s Home is the DNS and the 123/54 Vimla Nagar is the IP Address.
AAAA Record (IPv6 Address Record)
Before understanding the AAAA Record let’s understand Why we need ipv6 as the successor of ipv4.
IPv4 uses 32-bit addresses, allowing for about 4.3 billion unique addresses. At the time of its creation, this number seemed more than sufficient, given the limited number of devices connected to the internet. Later the growth of the internet and computers increased the demand for IP addresses and the concerns grew that IPv4 addresses would soon be exhausted. Then the IPV6 was developed to prevent this issue.
Today, IPv6 adoption is steadily increasing. It coexists with IPv4, and many ISPs, websites, and networks support both. Countries like India and China, with massive internet user bases, have seen significant IPv6 adoption due to the limitations of IPv4 in serving their large populations.
Coming back to the topic of AAAA records. The usage of the AAAA record for DNS resolution has great potential because it uses IPV6, which is an improvement over IPV4. Also, as the internet keeps growing and we're running out of IPV4 addresses, the potential for AAAA records is high.
AAAA records are used to resolve a domain name to the newer IPV6 protocol address.
For Example: Similar to an A record, but for a more modern type of address, like upgrading from an old address format to a new, more detailed one.
CNAME Record (Canonical Name Record)
CNAME or Canonical Name is used to point domain name to domain name. It is not mapped with IPV4 or IPV6 addresses instead of IP addresses it is mapped with another domain. For example: gogle.com is mapped with google.com.
For Example: Let’s assume there is no one knows your friend Rajesh then you will ask the father of your friend assume the father’s name is Vinod this father’s name i.e. Vinod is the alias (CNAME
Nameserver (NS) Record
A Nameserver (NS) record specifies the authoritative DNS servers responsible for a domain. These servers provide the necessary information, such as IP addresses, that enable internet applications like web browsers to locate and connect to websites associated with the domain name.
For Example: Imagine you want to visit your friend Rajesh, but instead of knowing his exact address (which is 123/54 Vimla Nagar, Nirmal Pradesh), but the issue is in Vimla Nagar there are 4 Rajesh now you have to ask the local information desk in Vimla Nagar: "Where is Rajesh's home?"
In this analogy, the local information desk is the Nameserver Record.
MX Records
An MX (Mail Exchange) record is a type of DNS record that specifies which mail server should handle emails for a particular domain. Essentially, it directs incoming emails to the correct server.
A domain can have several MX records, which allows for backup mail servers. If the main server is unavailable, the backups can take over. Here's an example of a domain with multiple MX records
For Example: Imagine you're sending a letter to Rajesh, who lives in a large city. Rajesh has two post offices that can deliver his mail:
Post Office A (priority 10): This is the primary post office, where all mail for Rajesh is usually sent.
Post Office B (priority 20): This is the backup post office, used only when Post Office A is too busy or temporarily closed.
Conclusion :
In this Article, we learned what DNS record types are. We also defined several DNS record types and saw analogies of what each type is used for.
DNS makes it possible for us to use human-readable domain names to access resources on the internet.