What Is DNS?
DNS stands for Domain Name System. It's the mechanism that translates human-readable website addresses — like example.com — into the numerical IP addresses that computers actually use to find each other on the internet.
Think of it as a contacts app on your phone. You search for "Mom" and your phone dials the actual number. Without that lookup, you'd have to memorize every phone number. DNS does the same thing for websites.
Why Do We Need DNS?
Every device connected to the internet has an IP address — a string of numbers like 172.217.14.196. Humans are terrible at remembering these. DNS lets us use memorable names like google.com instead, and handles the translation automatically behind the scenes.
The DNS Lookup Process: Step by Step
When you type a URL into your browser and press Enter, here's what happens in milliseconds:
- Browser Cache Check: Your browser first checks if it already knows the IP address from a recent visit. If yes, it skips the rest.
- OS Cache Check: If the browser doesn't know, your operating system checks its own cache and the local
hostsfile. - Recursive Resolver: Your device asks a DNS resolver — usually provided by your ISP or a public DNS like Google (8.8.8.8) or Cloudflare (1.1.1.1). This resolver acts as your agent, doing the legwork.
- Root Nameserver: If the resolver doesn't have a cached answer, it asks one of 13 root nameserver clusters. These servers know where to find information about top-level domains (.com, .org, .net, etc.).
- TLD Nameserver: The root server points the resolver to the appropriate Top-Level Domain (TLD) nameserver — for example, the .com registry.
- Authoritative Nameserver: The TLD nameserver directs the resolver to the domain's authoritative nameserver — the definitive source for that specific domain's records.
- IP Address Returned: The authoritative server returns the IP address. The resolver caches it and sends it back to your browser.
- Connection Established: Your browser connects to the server at that IP address and loads the website.
Key DNS Record Types
DNS doesn't just store IP addresses. Different record types serve different purposes:
| Record Type | Purpose |
|---|---|
| A | Maps a domain to an IPv4 address |
| AAAA | Maps a domain to an IPv6 address |
| CNAME | Aliases one domain name to another |
| MX | Directs email to the correct mail server |
| TXT | Stores text info, often used for verification |
| NS | Identifies the authoritative nameservers |
What Is DNS TTL?
Every DNS record has a TTL (Time to Live) value — a number in seconds that tells resolvers how long to cache the record before requesting a fresh copy. A low TTL (e.g., 300 seconds) means changes propagate quickly but generate more DNS queries. A high TTL (e.g., 86400 seconds / 24 hours) reduces load but slows propagation of updates.
Public DNS Servers Worth Knowing
- Google Public DNS: 8.8.8.8 / 8.8.4.4 — Fast, widely used, good reliability.
- Cloudflare DNS: 1.1.1.1 / 1.0.0.1 — Privacy-focused, often the fastest option.
- OpenDNS: 208.67.222.222 — Offers content filtering options.
You can manually configure your device or router to use any of these instead of your ISP's default DNS server — which can sometimes improve speed and privacy.
DNS and Privacy
Standard DNS queries are sent in plain text, meaning your ISP (or anyone on the same network) can see every domain you visit. Newer protocols address this:
- DNS over HTTPS (DoH): Encrypts DNS queries inside HTTPS traffic.
- DNS over TLS (DoT): Encrypts DNS queries using TLS on a dedicated port.
Both are supported by modern browsers and operating systems, and can be enabled in your settings for improved privacy.