Technology

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 that that site is hosted on and displaying that page to the person requesting the information. This is done through a series of messages that are passed between your Internet Service Provider and name servers.

How does the DNS work?

The entire system starts when you type a domain name in the 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’ll assume that you’ve 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 for you the IP address of the server that contains Google.com. Your ISP will then contact a “root” server (owned by ICANN, the Internet’s governing body) which will return an answer about where to look for .com domain names. The root server is known as a recursive name server, because it tells the ISP where to look next and doesn’t give a definitive answer.

Once the ISP knows where to look for .com domain names, it will go and ask that 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 its 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 then ask the “authoritative” nameserver for the IP address of Google.com (it’s authoritative since it’s the end of the line and has the response we want). This IP address will then be fed back through the ISP to your computer. Your computer will then connect, via your ISP, to that IP address directly to the web server containing Google.com and display the page to you.

This entire process is called “DNS resolution” or “DNS lookup” and 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 placed that allow the ISP to avoid having to go to each recursive nameserver. 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 all. the caches will still point to the old location and load the old page!

I hope this has helped you understand what DNS is and why sometimes the internet isn’t as instant as we’d like it to be!

Leave a Reply

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