What is DNS?
DNS (Domain Name System) is a hierarchical and distributed naming system that translates human-readable domain names (like example.com) into IP addresses (like 192.0.2.1) that computers use to identify each other on the network.
Quick Facts
| Full Name | Domain Name System |
|---|---|
| Created | 1983 by Paul Mockapetris |
| Specification | Official Specification |
How DNS Works
DNS was designed by Paul Mockapetris in 1983 and is often called the 'phonebook of the internet'. It operates through a distributed database system with multiple levels of servers: root servers, TLD (Top-Level Domain) servers, and authoritative name servers. When you type a URL in your browser, DNS resolvers query these servers to find the corresponding IP address. DNS supports various record types including A (IPv4), AAAA (IPv6), CNAME (alias), MX (mail), TXT (text), and NS (name server) records.
Key Characteristics
- Hierarchical distributed database system
- Translates domain names to IP addresses
- Uses caching to improve performance
- Supports multiple record types (A, AAAA, CNAME, MX, TXT)
- Operates on UDP port 53 (TCP for large responses)
- TTL (Time To Live) controls cache duration
Common Use Cases
- Website domain name resolution
- Email routing (MX records)
- Load balancing and failover
- Domain verification (TXT records)
- CDN and geographic routing
Example
DNS Record Types:
A Record (IPv4 address):
example.com. IN A 192.0.2.1
AAAA Record (IPv6 address):
example.com. IN AAAA 2001:db8::1
CNAME Record (Alias):
www.example.com. IN CNAME example.com.
MX Record (Mail server):
example.com. IN MX 10 mail.example.com.
TXT Record (Text data):
example.com. IN TXT "v=spf1 include:_spf.google.com ~all"
DNS Lookup Process:
1. Browser checks local cache
2. Query recursive resolver
3. Resolver queries root server
4. Root refers to TLD server (.com)
5. TLD refers to authoritative server
6. Authoritative returns IP address