DNS and Details

All about DNS lookup and DNS records

Sameer Supe
2 min readJul 10, 2021

DNS (Domain Name System) is used to map human-readable address of website to IP address of the server that site is hosted on. It is basically phone-book of all websites on internet.

When a user types an address in browser, the browser performs DNS Query to find IP address associated with that domain. First it attempts to look up that address in local browser or OS cache and if it is empty, then that request is forwarded to DNS Recursive Resolver. It is recursive in nature because it needs to make multiple requests to other servers.

1. Root Server:

The very first request is sent to root server. It checks the TLD (top level domain) of that address like google.com, yahoo.in etc. and responds back with IP of TLD server.

2. TLD Server:

Next request is sent to the TLD Server and it responds back with IP of Authoritative Server which is domain of our address like google.com, yahoo.in

3. Authoritative Server:

Finally, IP address of website we are trying connect is fetched from this server and is sent to the client. This is address will be cached for future use cases.

DNS lookup process

DNS Zone

DNS is a distributed database which handles most request than any other database. When one buys a domain name, registration is handled by a registrar (eg. Hostinger, GoDaddy) accredited by ICANN.

The DNS records are maintained by registry operator, who stores your DNS settings and propagates them to other DNS servers around the world.

As a registrant you will be confided zone file which can be used to configure domain settings. Every zone has SOA (Start of Authority) record to tell other DNS server who is in-charge of that domain. Below are some of the records:

A: One of the most important records, used to map hostname to its IP address.

CName: Canonical Name is used to route a domain to another domain instead of an IP address as usual.

MX: Mail exchange record is an entry which specifies a mail server to handle domain’s emails.

TXT: Text records are used to store information, to verify the ownership hostname

NS: Name Server records are address, internet relies on to find our IP address. There’s usually two of them.

--

--