Skip to content
5 min read

How DNS Works: From Domain Name to Web Page

Learn how DNS works in plain English — the journey from typing a domain name to loading a web page. Understand resolvers, records, TTL, and why DNS matters for every web developer.

#webdevelopment #dns #beginner #networking

You type kaiko.dev in your browser and a page loads. But your browser doesn’t actually know what kaiko.dev means — it needs an IP address. How DNS works is the process of translating domain names into the IP addresses that computers use to find each other.

The Phone Book of the Internet

DNS (Domain Name System) is often called the internet’s phone book. Instead of memorising that kaiko.dev lives at 76.76.21.21, you type the name and DNS looks up the number for you.

The DNS Resolution Process

When you type a domain name:

  1. Browser cache — has it looked this up recently? If yes, use the cached IP.
  2. OS resolver — your operating system checks its own cache and the local hosts file.
  3. Recursive resolver — your ISP’s DNS server does the heavy lifting.
  4. Root nameservers — the resolver asks which servers handle .dev domains.
  5. TLD nameserver — the .dev registry says which nameserver handles kaiko.dev.
  6. Authoritative nameserver — the final answer: here’s the IP address.

This all happens in milliseconds.

DNS Record Types

A record    — Maps a domain to an IPv4 address
             kaiko.dev → 76.76.21.21

AAAA record — Maps a domain to an IPv6 address

CNAME       — Alias pointing to another domain
             www.kaiko.dev → kaiko.dev

MX record   — Mail server for the domain
             kaiko.dev → mail.googlemail.com

TXT record  — Verification and metadata
             (Used for Google Site Verification, SPF records, etc.)

TTL — How Long Records Are Cached

Every DNS record has a TTL (Time to Live) in seconds. A TTL of 3600 means the record is cached for 1 hour. When you update DNS records (like pointing a domain to a new server), changes propagate slowly because every resolver keeps the old record until its TTL expires.

Before migrating a site: lower the TTL to 300 seconds a day in advance. The change will propagate much faster.

Conclusion

Understanding how DNS works helps you debug domain issues, understand propagation delays, and configure your own domains correctly. When your site isn’t loading after a domain change, it’s almost always a DNS propagation delay — now you know exactly why.

Read next: What Happens When You Type a URL in Your Browser?

External resource: Cloudflare — What Is DNS?

Kaikobud Sarkar

Kaikobud Sarkar

Software engineer passionate about backend technologies and continuous learning. I write about Python frameworks, cloud architecture, engineering growth, and staying current in tech.

Related Articles

CSS Flexbox in Plain English: A Beginner's Guide

Learn CSS Flexbox with simple, visual explanations. This guide covers display flex, justify-content, align-items, flex-wrap, and practical layouts every developer needs to know.

#css #flexbox