DNS: How the Internet Finds You

Hardik KumarHardik Kumar
2 min read

Domain Name Server, typically known as DNS, is just like a phonebook for the internet, which translates the entered URL into the corresponding IP address which is dedicated to the domain name. The whole process of finding the IP address for the entered domain is known as DNS resolution.

🔍 What Happens When You Enter a URL?

When you type a URL like google.com into your browser, a process called DNS resolution takes place. Here's how it works step by step:

  1. DNS Resolver: Your browser first contacts a DNS resolver (usually provided by your ISP). The resolver’s job is to find the IP address for the domain name.

  2. Root Server: Since the resolver doesn’t know the IP address, it asks a root server for help. The root server doesn’t know the exact address either but directs it to the Top-Level Domain (TLD) server (e.g., .com, .in).

  3. TLD Server: The TLD server points the resolver to the Authoritative Name Server (ANS) that holds the actual DNS records for the domain.

  4. Authoritative Name Server: This server responds with the IP address of the requested domain.

  5. Browser Connects: The resolver returns the IP address to your browser, which then uses it to load the website.

🔍 Do We Need DNS? Why Is It Important?

Yes, absolutely — DNS is essential to how we use the internet today.

Imagine if DNS didn’t exist — you’d have to remember long strings of numbers like 142.250.182.206 just to visit a website like Google. That’s not practical or user-friendly.

Thanks to DNS, we can use simple, human-readable names like google.com instead of complex IP addresses. It makes browsing easier, faster, and accessible for everyone.

🔸 Types of DNS Records You Should Know

Some of the DNS records that everyone should know

Record TypePurpose
A RecordMaps a domain to an IPv4 address
AAAA RecordMaps a domain to an IPv6 address
CNAMEMaps an alias to a canonical name, mainly used for subdomains like you.github.io
MXMail Exchange - routes emails to mail servers
TXTStores text data, often for SPF, DKIM, and verification
NSSpecifies authoritative name servers
SOAStart of Authority - metadata about the DNS zone

Conclusion

In this blog post, we explored what happens when you type a URL into your browser. We learned how the Domain Name System (DNS) translates domain names into the correct IP addresses, helping your browser locate and load the right webpage.

0
Subscribe to my newsletter

Read articles from Hardik Kumar directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Hardik Kumar
Hardik Kumar

👨‍💻 Full Stack Developer | MERN & Beyond | Generative AI Enthusiast As a Full Stack Developer, I specialize in building modern, scalable web applications using the MERN stack and beyond. During my previous internship roles, I contributed to both frontend and backend development on real-world projects, working with technologies like React, Node.js, and microservices-based architectures. With a BTech in Computer Science, I’ve built a strong foundation in programming and software development. I'm passionate about continuous learning and personal growth — and I document my journey as I explore new technologies, sharpen my skills, and strive to become a better engineer every day.