What is DNS? – DNS resolution and caching

DNS is the acronym for Domain Name System and it is the method by which the Internet works. It is a method of translating domain names (like Google.com) to an IP address and then locating the web server on which that site is hosted and displaying that page to the person requesting the information. This is done through a series of messages that are transmitted between your Internet service provider and name servers.

How does DNS work?

The whole system starts when you type a domain name in your taskbar (we’ll use Google.com for this example). Once you do this first, your computer will check its cache to see if it already has a record of the IP address for that page, for this example we will assume that you have never visited Google.com before.

If no records are found in your local cache, your computer will ask your ISP (Internet Service Provider) if it can find you the IP address of the server that contains Google.com. Your ISP will contact a “root” server (owned by ICANN, the Internet’s governing body) who will return an answer on where to look for .com domain names. The root server is known as a recursive nameserver, as it tells the ISP where to look next and does not offer a definitive answer.

Once the ISP knows where to look for the .com domain names, it will go and ask the nameserver where it can find information on “Google.com” (note that we are now looking for the entire domain, not just the extension) . This recursive nameserver will then check your records and tell the ISP that the IP address for that domain is on an “authoritative” nameserver, and give the ISP its location.

Your ISP will ask the “authoritative” name server for the IP address of Google.com (it is authoritative as it is the end of the line and contains the answer we want). This IP address will be sent through the ISP to your computer. Then your computer will connect, through your ISP, to that IP address directly to the web server containing Google.com and show you the page.

This whole process is called “DNS resolution” or “DNS lookup” and it is the key to how the modern Internet works due to the fact that we can remember domain names much better than IP addresses. To speed up this whole process at each stage, caches are implemented that allow the ISP to avoid having to go to all the recursive nameservers. This is both a blessing and a curse, as it greatly speeds up page load times, but it means that any changes to websites and settings (such as the IP address where a website is located) can take up to 48 hours. to be seen by everyone as the caches will keep pointing to the previous location and load the previous page!

Hope this has helped you understand what DNS is and why sometimes the internet is not as instant as we would like.

Leave a Reply

Your email address will not be published. Required fields are marked *