Skip to main content
All Posts

Shug Accidentally Learned DNS

3 min read
DNSNetworkingDevOps

It Started With a Domain

Shug buy domain. shubhamdalvi.in. Very cool. Shug feel like real developer now.

Then Shug try to connect domain to Vercel. Vercel say "Add A record." Shug say "What A record?"

The Rabbit Hole

Shug Google "what is DNS." 4 hours later, Shug know how the entire internet finds things.

DNS in Shug Terms

Imagine internet is big city. Every website is a building. Every building has an address (IP address, like 76.76.21.21).

But nobody remembers addresses. So we use names. Like "Shug's Chai Shop" instead of "Building 42, Street 7, Block C."

DNS is the phone book that converts names to addresses.

shubhamdalvi.in  →  DNS Lookup  →  76.76.21.21  →  Vercel Server

The Records Shug Had to Learn

RecordWhat It DoesShug's Analogy
APoints domain to IPv4 address"This name = this building"
AAAAPoints domain to IPv6 addressSame but for new city layout
CNAMEPoints domain to another domain"Ask Bob, Bob knows where"
MXMail server routing"Send letters to this mailbox"
TXTText verification"This sticky note proves I own this"

What Actually Happens

When someone types shubhamdalvi.in:

  1. Browser checks its cache — "Do I already know this?"
  2. OS checks its cache — "Maybe the computer knows?"
  3. Router checks its cache — "Anyone on this WiFi asked before?"
  4. ISP's DNS resolver asks Root nameservers — "Who handles .in domains?"
  5. Root says "Ask the .in TLD server"
  6. .in TLD server says "Ask Cloudflare, they manage that domain"
  7. Cloudflare returns the actual IP address
  8. Browser finally connects

All of this happens in ~50-200ms. The internet is wild.

The Deployment Saga

Shug's actual deployment timeline:

  • Hour 0: Buy domain, feel powerful
  • Hour 1: Add wrong DNS record. Website shows nothing.
  • Hour 2: Fix record. "DNS propagation takes up to 48 hours." Shug cry.
  • Hour 3: Discover dig command. Feel like hacker.
  • Hour 6: Website works. Shug very happy.
# Shug's new favorite command
dig shubhamdalvi.in +short
# Returns: 76.76.21.21

# The detailed version
dig shubhamdalvi.in ANY

What Shug Learned

  1. DNS propagation is real — TTL (Time To Live) determines cache duration
  2. Always use dig or nslookup to debug DNS issues
  3. CNAME and A records are 90% of what you need
  4. Cloudflare makes DNS feel almost easy
  5. Sometimes the answer to "why isn't my site working" is "wait 30 minutes"

Shug Wisdom

"Shug went to deploy website. Came back understanding how 4 billion devices find each other. Not bad for a Saturday."

Shug now explain DNS to juniors. Juniors eyes glaze over. Circle of life.