How does it work: The DNS Process
Breaking down how information is sent back to you, at super speed
So, DNS is what we consider essential for end-users and professionals to navigate the Internet, and to be able to browse easily and frequently.
DNS, as we’ve covered before, is the phone book of the Internet: it maps domain names to IP addresses. So, instead of having to remember 8.8.8.8 or 8.8.4.4 for being able to browse to the Google Public DNS page, you can just type in dns.google into the search bar and press enter. From there, you’re immediately able to get to the web page you want to access.
But what exactly are name servers? And how does even the process of DNS work, and work effectively, efficiently, and in a matter of seconds? Let’s take a look.
So, how does DNS work, exactly? Well, it first starts with the DNS query.
The DNS query is what begins to happen right after you typed in the name of the page you are looking for in the search bar/browser. After pressing enter or clicking search, the DNS query begins looking for the precise IP address associated with the page you are looking for and finding the right one. How does it know where to look for this IP address, you might ask? Well, it does so by checking the root server.
The Root Servers of DNS know all the information about DNS domains. In fact, there are 13 root servers. From the DNS query, it begins to look through all of the DNS information for the next place with the correct information, aka the TLD nameserver.
TLD nameserver, or top-level domain, is the last part of a domain name. Think of .com or .net or .org. There are also plenty of country-specific TLDs, such as .au or .uk. All TLDs have a specific TLD nameserver to look through that stores the specific DNS info for that TLD. In other words, if you’re trying to get to Facebook.com, the DNS query would look through the .com TLD nameserver for the information. After this, the process begins to look for the Domain nameserver.
Domain nameserver is where the DNS zone file for the specific page you’re looking for is found, along with finding the individual DNS records. The original DNS query will look through to find the A record for the site/page, which is mapped to the specific IP address. Upon finding this IP address, the query will retrieve the correct information and send you back the page you are looking for, and helping to complete your search and ability to communicate and browse the Internet.
This is also taking into account how, after visiting a site and then upon repeat visits, the DNS cache would speed up the process. This means that upon visiting a site multiple times, the DNS process would speed up due to keeping track of DNS lookups and visits.
So, imagine how quickly and seamlessly this process has to undergo: from you, the user, typing in the name of a web page, this whole process then starts up and successfully completes. Search, then DNS query, then Root Server lookup, then TLD nameserver lookup, , then domain nameserver lookup, and finally the correct web page response back to you, the user.
So, to recap:
DNS Query happens just after you click enter or search for the domain page you are looking for.
Root Servers are 13 root servers around the world that have the DNS information of all domains.
TLD/Top-Level Domains have a specific TLD nameserver that stores the DNS specific for that TLD(.com, .org, etc).
Domain nameservers have the DNS zone files for the site you are looking for, and upon finding the mapped IP address, the query will send back the information and page so you, the user, can continue your Internet browsing time.
Now then, with all of this information and knowing more about the process, it seems like the work and searching is done. However, there is more to understand, because just as you may use the Internet for normal everyday things, hackers and threat actors are using the same tools and methods and processes to attack you and to steal your information.
How, then, can DNS be used by hackers and attackers?
Stay tuned for next week’s article, all about DNS hijacking. Thank you for reading!