DEV Community

Millicodhiambo
Millicodhiambo

Posted on

I Was Basically Gaslighted Into Learning DNS... and I'm Glad I Was

I have a confession.

I was strongly encouraged (read: lovingly gaslighted ) into writing this article. At first, I thought, "Why me? Can't someone else do it?"

But looking back... I might actually thank the people who pushed me.

Researching DNS and writing this article taught me far more than simply listening to the tech talk we had on Friday. It forced me to ask questions, connect the dots, and understand what actually happens every time I open a website.

So, if you've ever heard people throw around the term DNS and wondered what all the fuss is about, this one's for you.

What is DNS?

Imagine you want to visit your friend's house.

You probably remember their name, not their exact GPS coordinates. So you open Google Maps, type in their name or location, and your phone figures out where to take you.

The internet works almost exactly the same way.

DNS stands for Domain Name System. Think of it as the internet's phonebook—or even better, its contacts app.

Instead of remembering an IP address like 142.250.190.78, you simply type google.com.

DNS translates that easy-to-remember name into the numerical IP address that computers use to find each other.

Without DNS, we'd all be memorizing long strings of numbers just to visit our favorite websites. Imagine trying to remember the IP addresses for Google, GitHub, YouTube, Netflix... every single day.

No thanks.

So What Actually Happens?

Let's say you type github.com into your browser.

Here's what happens behind the scenes:

  1. Your browser asks, "What's the IP address for github.com?"
  2. It checks with a DNS resolver to see if the answer is already cached.
  3. If it isn't, the resolver asks other DNS servers until it finds the correct IP address.
  4. The IP address is sent back to your browser.
  5. Your browser connects to GitHub's server and loads the website.

All of that usually happens in just a few milliseconds.

Pretty cool, right?

Why Does DNS Matter?

DNS makes the internet much more human-friendly.

It allows us to:

  • Remember names instead of complicated IP addresses.
  • Keep using the same website address even if the website moves to a different server.
  • Load websites faster through caching, where recently looked-up addresses are temporarily stored.

Without DNS, browsing the internet would be a lot slower and a lot more frustrating.

Another Way to Think About It

Think of your phone contacts.

  • Contact Name → google.com
  • Phone Number → IP Address
  • Tapping the Contact → Opening the website

You don't memorize everyone's phone number—you save their name and let your phone handle the rest.

DNS does exactly that for the internet.

Final Thoughts

DNS is one of those technologies that's quietly doing its job every single day.

Most of us never notice it, yet every website we visit depends on it.

This article started as an assignment I wasn't exactly excited about. But by the time I finished researching and writing it, I realized I'd learned far more than I expected.

Sometimes the things we're "forced" to learn end up becoming the things that make everything else in tech start to click.

If you're just starting your journey into networking or web development, understanding DNS is a great place to begin.

Top comments (0)