What is DNS and Why it's important ?

What is DNS and Why it's important ?

Imagine having to memorise everyones phone number which is present or saved in your contact app, sound impossible right ? That is exactly what the internet would be like without DNS, the magical system that translates easy to remember domain names (URL) into a unique set of numbers that machines or computers understand (IP addresses).

But before you start your journey to know DNS, you should know some basic things first like what is the internet, browser, client, server, IP addresses and domain name then you understand better what is DNS, how it works and why it is so important. Here is the link if you want to know about the things mentioned above.

Now i assume you have some basic knowledge of how internet works, what is browser, client, server, IP address and domain name. So without further ado lets start.

What is DNS ?

DNS full form is Domain Name System. A system that makes it possible for human to remember (domain name) and access websites using names (URL) rather than unique sets of numbers (hard to remember). It is like the internet address book which helps to translate human friendly domain names (i.e. youtube.com) into a unique set of numbers IP addresses (i.e. 192.106.1.1).

Visualize DNS as a internet address book

Why Does DNS Exist and why it is important ?

Computers communicate using IP addresses which are unique set of numbers but memorizing these numbers is hard for humans. For example - Instead of typing 192.106.1.1 to access youtube we simply type youtube.com which is far easier to remember. DNS eliminates the need to memorize these unique set of numbers by acting as a middleman (translator) between humans and computers.Think without DNS we would need to remember IP addresses for every website. It supports billions of devices and websites ensuring smooth communication.

How DNS Works

Step by step we see how DNS works -

Step 1 → Browser - You type youtube.com (domain name) in your browser and then initiate a request by searching.

Step 2 → DNS - Domain name request goes into DNS then DNS starts its search by communicating root server.

Step 3 → Root Server - Directs to the correct TLD (top level domain) server (.com, .org. , .in, etc).

Step 4 → TLD Server - Directs to the specific domain ANS (Authoritative Name Server).

Step 5 → ANS - Provide the actual IP address to DNS.

Step 6 → DNS - Sends the IP address back to your browser.

Step 7 → Browser - Uses the IP address to connect to the server.

Step 8 → Server - Recieve the request and prepare to give the response.

Analogy -

Suppose you (browser) have to send a letter to your friend (server) but don’t know their exact address. You take your query (think as a domain name) the letter to the local post office (think as a DNS) and ask for instructions to send your letter. The post office (DNS) refers you to a central directory (think as a Root Server) for guidance on which regional office (think as a TLD server) handles your query. The central directory directs your query to a regional office that specializes in addresses. The regional office points you to the local office (think as a ANS) which has the exact address for your friend (the IP address for domain name). The local post office gives you the exact address (IP address) and now you (browser) send the letter to your friend (server).

DNS Hierarchy Explained

DNS hierarchy is like a structure that organizes how domain names are translate into IP addresses. Each level in the DNS hierarchy plays an important role in helping connect the browser to the website you want to visit.

Levels of DNS Hierarchy

1 → Root Level - The root level is the starting point of DNS which is represented by a dot ( . ). Root server don’t know the IP address of a domain but direct your query to the correct Top level domain (TLD) server. Example - Your query - What is the IP address of youtube.com ?. Root Server - i don’t know but ask the .com TLD server.

2 → Top Level Domain (TLD) Level - The TLD server manage specific domain extensions like .com, .org, .in, .net, etc. TLD server directs the query to the authoritative name server (ANS). Ecample - Your query - What is the IP of youtube.com ?. TLD server - Ask the ANS for youtube.com.

3 → Second Level Domain (SLD) - The second-level domain is the unique name registered by an organization or individual like youtube in youtube.com . The ANS for the second level domain holds the DNS records for that domain. (you will see DNS records in next section). Example - Your query - what is the IP of youtube.com ?. ANS - Here is the IP address (198.106.1.1).

4 → Subdomains Level / Hosts - Subdomains are parts of a domain that can be managed independently. Example - youtube.com (common for websites), mail.xyz.com (used for email services), blog.xyz.com (used for blog), etc.

What is DNS Records and it’s types

DNS records are instructions stored on DNS servers that provide important information about the domain. These records help the DNS system resolve domain names into IP addresses and instruct how the domain should handle specific types of queries. Example - subdomain management.

Types of DNS Records - (Most common ones you should know)

1 → A Record - Translate a domain name to an IPv4 address (IP address version). Example - Domain name - youtube.com . IPv4 address - 198.106.1.1

2 → AAAA Record - Translate a domain name to an IPv6 address (IP address another version). Example - Domain name - youtube.com . IPv6 address - 2666:2800:220:1:248:1893:25c8:1946

3 → CNAME - CNAME stands for Canonical (means rule) Name Record. It creates alias (means false name) by pointing one domain name to another domain name. Example - Alias - youtube.com . Actual - youtube.com

4 → MX Record - MX stands for Mail Exchange Record. Specifies the mail servers for receiving emails for a domain. Example - Domain name - xyz.com . Mail Server - mail.xyz.com

5 → NS Record - NS stands for Name Server. It identifies the DNS severs responsible for a domain. Example - ns1.xyz.com , ns2.xyz.com, etc.

Why are DNS Records important ?

DNS records are like the internet contact app. They connect easy to remember website names (like youtube.com) to the unique set of numbers (IP addresses) that computers use to find each other. This means we can type in simple names instead ofunique set of numbers. These records also make sure websites and online services can be found by sending traffic to the right place by choosing the right path. They help deliver emails correctly, help computers find different online tools, make it easy for website owners to manage their websites (like updating locations or handling lots of visitors) and even help keep things secure online. Basically DNS records are importand for the internet to work smoothly and be easy to use by humans.

Thanks for reading this far.