Skip to main content

Command Palette

Search for a command to run...

DNS Record Types

Published
3 min read
DNS Record Types

As we talked about what is DNS and its need in the previous blog. You can read it here:

DNS Working

In this particular blog we will talk about a specification in DNS, that is the need of DNS records

Why its Required?

The process of searching the correct hosting ip using DNS contains many subprocesses, but we need the least latency in our system and get the response in the shortest time possible. But the problem here arises that the data sent contain information like IPs, Mail servers,TXT records,NS records and Aliases etc. and its a lot of data. So the thing we compromise in place of that large data could be response time.

To solve this problem arises the need for a systematic system to send different types of data according to the requirements. The systematic framework has been developed in the form of records ,which are defined based on the type of data we require. Also it doesn’t limits to only one type of data but multiple types can be sent at the same time.

The information regarding the record type is always stored in the authortative DNS server. Now lets get to know the types of records that exist.

Types of Records

  • A - The most basic of record types and used when pointing towards an ip directly. Like it tell us that the ip for your request is x.x.x.x. It runs on IPv4 internet protocols

  • AAAA - Works exactly the same as A records but due to the running out of the possible ip addresses in accordance with IPv4 , its uses the newly introduced IPv6. For the use of IPv6 AAAA type records are used.

  • CNAME - These types of record are used when a domain name after reaching the authortative DNS gives us out another domain instead of an ip address. Its most common use case is when we publish a blog on Hashnode with custom domain ,first it redirects us to hasnode domain then which further send us to the custom domain to get the A name record.

  • MX - This type of record is used for looking up the location of a mail server for a domain name. It acts as a guide to the incoming mail.

  • TXT - This is used for domain name verification and sending metadata, validation rules .Thye primarly security protocols that verify sender legitimacy and prevent spam, it confirms the data is recieved from the correct domain.

Usage of multiple records together

There are multiple records but not all are recieved together , they just act like different queries based on the request and help to fill the requested data , accordingly when the responses are recieved. Each query will have its specific purpose.

Multiple DNS records are used together by application logic and not by DNS itself. This logic is decided by the application you are using , like for searching a browser logic is responsible.For more realted to logic you can read my blog about browser.

Common differences in record types