Networking

What is DNS?

DNS (Domain Name System) is the internet's phone book — it translates human-readable domain names like example.com into machine-readable IP addresses like 192.168.1.1. Without DNS, you would need to memorize numerical IP addresses to visit websites.

How Does DNS Work?

When you type a URL into your browser, a DNS query is initiated. Your device first checks its local cache, then queries a recursive DNS resolver (usually provided by your ISP or services like Cloudflare 1.1.1.1 or Google 8.8.8.8). The resolver queries root servers, then TLD servers (.com, .org), and finally the authoritative nameserver for the domain to get the IP address.

DNS records come in several types: A records map domains to IPv4 addresses, AAAA records map to IPv6, CNAME records create aliases, MX records direct email, and TXT records store verification data. DNS changes propagate globally over 24-48 hours through a process called DNS propagation, during which some users may see old records while others see new ones.