What is DNS?
The Domain Name System, the distributed database that translates human-readable domain names into the IP addresses computers actually route to.
When you type example.com into a browser, your machine asks a DNS resolver for the IP that name points to. The resolver walks the hierarchy, root servers, then .com servers, then example.com's authoritative servers, and returns an A record (IPv4) or AAAA record (IPv6). Your browser then opens a TCP connection to that IP.
DNS records come in many types. A and AAAA map names to IPs; CNAME aliases one name to another; MX points mail to mail servers; TXT carries arbitrary text (used by SPF, DKIM, domain verification); NS delegates a subdomain to a different set of authoritative servers.
DNS is famously cached at every layer: the OS, the resolver, intermediate caches, sometimes the application. That caching is why DNS changes "take 24 hours to propagate", the change happens instantly at the authoritative server, but every cache between you and it has to expire its old answer.
In the wild
- An A record pointing
example.comto93.184.216.34 - A CNAME aliasing
www.example.comtoexample.com - An MX record routing
@example.commail through Google Workspace