DNS or Domain Name System is a term commonly mentioned on the Internet and for a good reason. It is a crucial part of the Internet or any network based on the IP (Internet Protocol) and has been in use starting in 1985. Many people describe it as the Internet’s phone book, and you’ll quickly realize why. For now, it’s important to know that every website you access using your web browser employs DNS to load resources you see in the window. Without it, we humans would have lots of trouble remembering where every website is located, let alone every web page, as their IP address can change. With that said, let’s answer what DNS is, and clue you in on other things you must know.
DNS (Domain Name System) converts domain names into corresponding IP (Internet Protocol) addresses, a process your web browser initiates when you enter a domain name (such as wpthinker.com) into the address bar. People refer to that process as DNS lookup, which essentially lets users type a simple, easily remembered word without ever remembering the IP address. You can see why people use the analogy of a phone book since a domain name can be exchanged with a contact name and IP address with a phone number. The system was introduced after keeping a master list of all IP addresses manually became impossible. Though it was enhanced through these four decades, the core remains unchanged.
Why do we need Domain Name System?
Every device connected to the network (we’ll use the Internet in our analysis), no matter the size, has a unique IP address. Though somewhat long and difficult to memorize, IPv4 addresses such as 126.96.36.199 might be feasible for use. Well, if they never changed, and you only visited a few websites in perpetuity, which was the case in the early days of the Internet. Since that isn’t the case today, users require a more practical solution, which is domain names. To emphasize the significance, the stats for Q3 of 2021 show 364.4 million registrations of top-level domains. That’s a nearly unfathomable number of IP addresses.
On that note, we should mention that IPv4 addresses are slowly running out, and a superior version, IPv6, is slowly being introduced. This makes the existence of DNS undoubtedly essential. That’s because IPv6 can be single, such as 2001:db8:4444:5555:5255:6666:7777:8888. Moreover, it can be dual, a combination of IPv4 and IPv6, which can look something like this: 2001:db8:3333:4444:5555:6666:122.226.312.445. We don’t need to explain how inconvenient if at all possible to remember these are.
How does DNS function?
Though you know the gist, you still don’t know how the DNS routing procedure works. Don’t fret if you don’t know the meaning of some of these terms, because we will explain them in the section below. We did this intentionally, so those with some knowledge can recall the specifics without reading an in-depth explanation. Newcomers can still reread the entire process with exhaustive information at hand. Now, the process of a DNS resolution, also known as DNS lookup, is as follows:
- The user opens a web browser and enters a URL (Uniform Resource Locator, such as https://wpthinker.com) or domain name (wpthinker.com) into the address bar. This initiates a request for the resources on that web page.
- This request called a recursive DNS query, is forwarded to the local recursive resolver or local resolving nameservers to examine whether it has DNS records for that domain saved. If it does, the browser gets the appropriate IP address and loads the web page. If it does not, the search continues.
- Resolver sends the request to the next DNS server type in line, root nameservers. These analyze the Internet’s root zone for existing DNS records. Although these are no longer limited to your ISP, many newcomers employ ISP-provided ones unknowingly. Some users opt for a public DNS server, such as Google’s 188.8.131.52 one.
- Root nameservers rarely provide an answer to the query. Instead, they check records and send a list of authoritative domains for every TLD (top-level domain). They contact the TLD nameservers in charge afterward.
- If an IP address isn’t found by this point, TLD nameservers reach out to authoritative nameservers. Once again, they seldom provide a resolution. These provide a final answer from the original DNS records or copies of the originals. At this point, either the IP address is found and the web page loads or the user gets an error message.
Keep this in mind about the resolution process
The entire procedure happens in about 30 milliseconds in most cases, about the speed of a blink of an eye. It’s also important to note that the last three DNS servers, although they start in that order, continue to bounce requests among themselves. They do until the DNS record is either discovered or deemed non-existent.
Four pivotal types of DNS servers
We realize the procedure doesn’t mean much without a better explanation of each term. Therefore, here’s a better explanation of four kinds of DNS servers:
- Recursive DNS servers. This form takes requests from a user (an application, such as a web browser). It then checks whether there’s a cache in local DNS servers. This cache is frequently stored by your ISP (Internet Service Provider). However, the duration varies based on determined TTL (Time To Live). This time can range from a mere 30 seconds up to a week.
- Root nameservers. As mentioned, these servers rarely have a response to the query. Instead, they store an index of other DNS servers responsible for that domain (the two next in line). A department of ICANN (Internet Corporation for Assigned Names and Numbers) named Internet Assigned Numbers Authority supervises these.
- TLD servers. Very similar to root nameservers in the sense they only store an index of authoritative nameservers in charge. They act as a filter since they narrow down a query based on top-level domain, i.e, .com, .edu, .org, and so on.
- Authoritative DNS servers. Nameservers that are in charge of providing responses to queries for DNS records. These are separated into smaller links with their authority. For instance, based on region, country, area of a country, or even a larger organization. The authority in charge is either the provider of DNS services (Google in the example above) or a DNS registrar, like many web hosting providers that offer these services. It’s also important to distinguish two forms:
- Master authoritative nameservers are in charge of storing original DNS records.
- Slave authoritative nameservers store a copy of the master data. They act as a backup in case those records are unavailable.