What is DNS ( Domain Name Server )? Explanation
The Domain Name Server (DNS) is used to resolve human-readable host names like www.activityhack.com into machine-readable IP addresses like 188.8.131.52
Why it’s important?
It is important because names are easy for people to remember and read, computers uses IP addresses to access websites.
If you want to visit http://activityhack.com in the browser (Chrome or any other browser), your computer will use the Domain Name Server to retrieve the IP address of the website which is 184.108.40.206. Actually, without DNS, you would only be able to visit our website (or any website) by visiting the IP address directly, such as http://220.127.116.11.
How does Domain Name Server work?
When you try to visit a website domain, your machine will do a series of steps to translate the domain name into a machine-readable IP address.
– Requesting information from local DNS cache on your computer, which is the data that your computer has newly retrieved.
– If the data is not cached locally, the machine will contact ISP’s DNS servers.
– If the data do not exist on ISP’s DNS servers, The machine starts by asking the translation to a root name server. There are 13 of them, and they are the entry points of the DNS protocol, but when they get a request, they regularly don’t know the answer (as there are too many domain names) but they know who to ask.
– Root servers redirect you to TLD(Top Level Domain) servers. There are two types these are the Generic TLDs (.com,.net,.edu etc ) and Country code TLDs(.in ,.au etc)
– If the TLD servers don’t have the answer, it redirects you to the authoritative servers these are the name servers where your domain name is registered.
– The ISP recursive server retrieves the A record for the domain from the authoritative name servers and stores the record in the local cache.
– Then ISP recursive server returns the A record back to your computer, and your machine stores it in the cache.