en
Back to the list

How DNS Works and Why It Matters

15 October 2020 11:00, UTC
Lucy Carney

If you use the internet a lot, or have your own website, you may have heard the term DNS. But what does it stand for? How does it work? And is it actually that important?

DNS stands for Domain Name System, and yes, it is very important. Without it, the way we navigate the web every day would be very different. We’ll walk you through exactly how it works and why it matters, with some graphics to help along the way.

What Is DNS?

In simple terms, DNS (Domain Name System) has one main job, which is to translate domain names into IP addresses. Computers use IP addresses to talk to each other and identify different webpages. The problem with this is that IP addresses are made up of strings of numbers that us humans struggle to remember. This is why we navigate the web using domain names like example.com.

This presents a problem, though – there’s a language barrier because the computer doesn’t use domain names to find web pages. Enter DNS! When we search for a domain, DNS translates it into an IP address that your web browser can easily understand. Without DNS, we would have to remember strings of numbers to access webpages – it’d be like memorizing your entire phone contact list just to spend a day visiting your favorite websites.

image.png

How Does DNS Work?

When you enter a domain into your web browser, it kickstarts the DNS query – the process of finding the correct IP address for your search. There are a lot of steps to a DNS query, but the first thing to do is introduce the four DNS servers.

Introducing: The DNS Servers

image.png

These four servers work together to translate your domain into an IP address, and each has a vital role to play. These roles reflect those in an archive, with a front desk, librarian, archive keeper, and translator – each one is responsible for a different stage of the lookup process:

  • Resolving name server: Front desk – this is the first server in the lookup process. It receives the query, and its job is to visit each server until it finds the IP address to give back to the web browser.
  • Root name server: Librarian – the first place the resolving name server visits is the root name server. Its main job is as a point of reference, to tell the resolving name server where to look. It gives specific directions to the correct TLD name server.
  • TLD name server: Archive keeper – TLD stands for Top Level Domain. So if the query is for example.com, the resolving name server will visit a .com TLD server, rather than a .org or .net TLD server. This starts to narrow down the search!
  • Authoritative name server: Translator – the last server in the DNS lookup process, this server can provide the exact IP address the browser needs.
image.png

So, you know each server and its role – but how exactly do they work together to translate a domain name into an IP address? There’s a lot of toing and froing between the servers, which can make the DNS process seem complicated, but once you understand the role of each server it’s actually pretty simple!

How DNS Works: Step-by-Step Walkthrough

image.png
  1. Bob searches for a website address. For example, www.websitebuilderexpert.com.
  2. Bob’s browser checks its cache. If you’ve searched for something before, your browser may have the IP address already saved in its memory, in which case it doesn’t need to to start a DNS lookup.
  3. Bob’s operating system asks the resolving name server for the correct IP address. The IP address isn’t stored in Bob’s computer, so the operating system sends a request externally. This starts the DNS lookup query.
  4. The resolving name server queries a root name server. The resolving name server doesn’t have the right IP address in its cache either. So it asks a root name server instead: “Do you know the IP address for www.websitebuilderexpert.com?
  5. The root name server directs the resolving name server to the right TLD name server. “I don’t know, but you need to go ask this .com TLD name server.” The resolving name server goes to the .com TLD server.
  6. The resolving name server queries the .com TLD name server. “Do you know the correct IP address for www.websitebuilderexpert.com?
  7. The TLD name server directs the resolving name server to the correct authoritative name server. “Sorry, I don’t know the right IP address. But this authoritative name server will!”
  8. The resolving name server queries the authoritative name server. “Do you know the correct IP address for www.websitebuilderexpert.com?” This time, it gets a new answer. “Yes! Here’s the IP address for www.websitebuilderexpert.com.
  9. The resolving name server takes the IP address back to the operating system. The operating system then passes it to the web browser, which connects to the IP address…
  10. The web browser uses the IP address to load the page for www.websitebuilderexpert.com. So Bob can happily peruse the page he was looking for.

This may seem a lengthy and even complicated process. Poor Bob, you might think, he was probably waiting for that web page all day. But the astounding fact is that this whole DNS query happens faster than the blink of an eye!

Why Is DNS Important?

DNS makes the internet a more user-friendly, accessible place for everyone. Without it, we would all have to remember IP addresses like this 123.456.7.7 to navigate the web. There are over 300 million registered domains across the world, so imagine having to remember them all!

Because of DNS, however, we can simply type in the name of the web page we want to visit. Not only does DNS make browsing the web easy, it also makes it fast. The whole lookup process is designed to be super speedy and efficient – there are different types of query to save as much time as possible.

image.png

For example, a non-recursive query is where the DNS already has the answer stored in its cache, meaning it can deliver immediate results.

image.png

DNS is important – you could even argue that it forms the backbone of the web – and it’s also important to understand how it works. If you have a website, it’s worth checking that your DNS records are all in order, using online tools such as:

  • MXToolBox – simply enter your domain name to run a DNS check, see if your DNS servers respond, measure performance, and audit the results.
  • IntoDNS – checks your domain’s health and configuration, and provides a DNS and mail servers report.
  • DNS Inspect – a free web tool that checks your domain’s servers for common DNS errors, along with tips on how to fix them.

Wrap-Up

DNS is the unsung hero of the internet. Without it, browsing the web would become much less enjoyable – it would be slow, frustrating, and inaccessible to a lot of people. We would all have to memorize strings of numbers to visit websites, or try to translate domains into IP addresses ourselves.

Instead, DNS queries seamlessly take our web searches and deliver the correct web page, all in the blink of an eye. Many people are totally unaware of the complex steps that happen behind the scenes when they search for a web page online. But understanding this process sheds a new light on how we navigate the web, and can even help ensure your domain is in the best condition to be processed quickly and efficiently by the DNS servers.

About the Author:

Lucy Carney writes for Website Builder Expert, the leading authority in helping people build an online presence. She specializes in website building, ecommerce, hosting, and WordPress, and uses her digital expertise to help growing businesses find success. Her writing has been featured on UsabilityGeek, Shopify, and Serpstat.