How DNS Works: An Introduction to Domain Name System

How DNS Works: An Introduction to Domain Name System

Have you ever wondered how typing a web address like example.com in your browser bring you the exact page of the website that you are looking for? Behind the scene, a digital translator make it all possible. Let uncover it and see how it powers the internet.

Understanding IP address

Before diving into the details of DNS servers, we first need to understand IP addresses.

An IP address is a unique address that identifies a device on the internet or a local network.

There are two main types of IP addresses:

  • IPv4 (Internet Protocol version 4): Uses a 32-bit address format (e.g., 192.0.2.1).

  • IPv6 (Internet Protocol version 6): Uses a 128-bit address format (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334).

It is important for routing purpose and also for devices so that they can easily communicate with each other.

What is DNS?

The Domain Name System (DNS) is the phonebook of the internet. The DNS had made it possible to convert the human readable domain names like google.com, youtube.com, etc. to machine readable IP addresses.

The DNS is required because every device that is connected to the internet has a unique IP addres which other machines use to find the device on the network. The DNS servers had eliminate the need for humans to memorize the IP addresses and instead directly use the Domain name of the website. This IP address is required because browser uses this IP address to search the website on the web and retrieve the necessary resources from it.

How DNS works?

The process of converting a domain name (e.g., example.com) to its IP address (such as 92.168.1.1) is called a DNS Resolution process.

Before understanding about how DNS process works we first need to understand the 4 DNS servers that are involved in this process.

DNS Servers

  1. DNS Recursor (Resolver)

    The DNS Recursor is the first server that your client contact when there is a need to resolve the IP address from the given domain name. It interacts with other DNS servers in the hierarchy to gather the required information which in our case is IP address.

  2. Root Nameserver

    The root nameserver is the starting point of the DNS Resolution process. It does not contain the IP address of the requested domain but knows which Top Level Domain (TLD) server to contact for the request domain extension.

    For example: For domain like example.com , the root nameserver provides the IP address of the TLD server which .com.

  3. Top Level Domain (TLD) Nameserver

    The TLD nameserver manages the domain for the top level domains (e.g., .com, .net). The TLD server responds with the IP address of the authoritative nameserver for example.com.

  4. Authoritative Nameserver

    The authoritative nameserver is the final step in the DNS resolution process. It stores and provides DNS records (like A, AAAA, MX, etc.) for the specific domain. These records contain the actual IP address of the requested domain or subdomain. The authoritative server retrieves the corresponding IP address (e.g., 192.0.2.1) from its records and sends it back to the resolver.

Working of DNS

  1. A user types the domain name of the website like example.com into the web browser and search for the results. The search query travels into the internet and is received by DNS recursive resolver.

  2. The DNS recursive resolver then queries the root nameserver.

  3. The root nameserver responds to the resolver with the address of a Top Level Domain (TLD) DNS server (such as .com or .net), which stores the information for its domains.

    For e.g: When searching for example.com, our request is pointed toward the .com Top Level Domain (TLD) DNS server.

  4. The resolver then make a request to the .com Top Level Domain (TLD) DNS server.

  5. The Top Level Domain (TLD) DNS server then responds with the IP address of the authoritative nameserver of the example.com.

  6. Lastly, the recursive resolver sends a query to the authoritative nameserver.

  7. The IP address for example.com is then returned to the resolver from the nameserver.

  8. The DNS resolver then responds to the web browser with the IP address of the domain requested initially.

  9. The browser makes a HTTP request to the IP address.

  10. The server at that IP returns the webpage to the browser.

Why it’s important?

DNS servers are very important for smooth functioning of the internet they translate the human readable domain names into the machine readable IP addresses. Without DNS, humans have to keep track of the IP addresses of the websites that they visits. The DNS server allow us to write the domain name of the website and it then goes out to find the right IP address of the website, which he then gives to the browser so that he can load the webpage.

DNS Server Not Responding? What Does That Mean?

You sometimes sees a message “DNS server isn’t responding” after entering the domain name of the website in the URL. This could happens due to few reasons:

  1. The internet connection may be weak or unstable, making it difficult to communicate with the DNS server.

  2. Your DNS settings or browser need to be updated.

  3. There might be an issue in the DNS server.

Conclusion

In conclusion, the Domain Name System (DNS) is an essential part of the Internet. It acts as a bridge for translating human readable domain names into machine readable IP addresses. Without DNS, navigating the internet would be much more difficult, as we have to remember the complex IP addresses for every website. DNS makes the internet user-friendly and efficient, allowing us to easily access websites and online services by using simple, memorable names.