DNS is the phone book of the internet, translating names people remember into addresses machines use. It runs invisibly behind every site visit, yet most developers only meet it when something breaks or a change "has not propagated yet". Understanding the system makes those moments far less mysterious.
The lookup journey
When you visit a domain, your computer asks a resolver (usually your ISP’s or a public one) for its IP. If the resolver does not already have the answer cached, it walks the DNS hierarchy: root servers point to the top-level domain servers (like .com), which point to the domain’s authoritative name servers, which finally return the address. The resolver caches the result so the next lookup is instant.
The record types you configure
- A — maps a name to an IPv4 address.
- AAAA — maps a name to an IPv6 address.
- CNAME — points one name at another name (an alias).
- MX — directs email to mail servers.
- TXT — arbitrary text, used for verification and email security (SPF, DKIM).
- NS — delegates a domain to its authoritative name servers.
Why changes take time: TTL
Every DNS record has a TTL (time to live) telling resolvers how long to cache it. When you change a record, resolvers that cached the old value keep using it until the TTL expires — which is why a change can seem to "not work" for some users while working for others. Lowering the TTL before a planned change shortens this window.
A practical tip
Before migrating a site or mail, reduce the relevant record’s TTL a day in advance. Then when you make the switch, the change propagates quickly because caches expire sooner. Raise the TTL again once everything is stable to reduce lookup load.