Domain Name System (DNS)
DNS is the phonebook of the Internet. Humans access information online through domain names, like nytimes.com. Web browsers interact through Internet Protocol (IP) addresses. DNS translates domain names to IP addresses so browsers can load Internet resources.
The DNS Hierarchy
DNS is a distributed database structured hierarchically:
- Root Servers: The top of the hierarchy. They know where to find the TLD servers.
- TLD Servers: Top-Level Domain servers (like .com, .org, .net). They hold information about the authoritative servers for specific domains.
- Authoritative Name Servers: Hold the actual DNS records (A, AAAA, MX, CNAME) for a specific domain.
DNS Resolution Process
When a user types a URL, a recursive resolver queries the root, then the TLD, and finally the authoritative server to find the IP address, caching the result along the way to improve efficiency.