What Is DNS? – DNS Resolution and Caching


DNS stands for Domain Name System and is the method by which the internet works. It is a method of translating domain names (such as Google.com) into 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 by a series of messages passed between your internet service provider and name servers.

How does DNS work?

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

If no record in found in your local cache your computer will ask your ISP (internet service provider) if it can find you the IP address for the server containing Google.com. Your ISP will then contact a “root” server (owned by ICANN the governing body of the internet) who will return a response of where to look for.com domain names. The root server is known as a recursive name server as it tells the ISP where to look next and doesn’t offer a definitive answer.

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

Your ISP will then ask the “authoritative” name server for the IP address of Google.com (it is authoritative as it is the end of the line and holds the answer we want). This IP address will then be fed back by the ISP to your computer. Your computer will then connect, via your ISP to that IP address directly to the web server holding Google.com and characterize the page for you.

This whole course of action is called “DNS resolution” or a “DNS lookup” and is the meaningful to how the modern internet works due to the fact that we can remember domain names much better than IP addresses. In order to speed up this whole course of action at each stage caches are put in place that allow the ISP to avoid having to go to every recursive name server. This is both a blessing and a curse as it greatly speeds up page loading times, but method 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 nevertheless point to the old location and load the old page!

I hope this has given you some help in understanding what DNS is and why sometimes the internet is not as moment as we would like it to be!

leave your comment