The hierarchy:
- Root nameservers
- TLD nameservers (.com, .uk, .io)
- Authoritative nameservers (for the specific domain)
The flow when you visit example.com:
- Browser asks OS resolver
- OS asks recursive resolver (ISP or 8.8.8.8 or 1.1.1.1)
- Recursive resolver asks root, then .com, then example.com's authoritative server
- Result cached by everyone along the way for the TTL
Record types worth knowing:
| Type | Purpose |
|---|---|
| A | IPv4 address |
| AAAA | IPv6 address |
| CNAME | Alias to another domain (can't be at root) |
| MX | Mail server for the domain |
| TXT | Arbitrary text (SPF, DKIM, domain verification) |
| NS | Nameservers responsible for the zone |
| SOA | Start of authority — zone metadata |
| PTR | Reverse DNS (IP to name) |
| SRV | Service records (used by SIP, LDAP, etc.) |
Alias vs CNAME (AWS Route 53 specific):
- CNAME — DNS standard, can't be used at the zone apex (e.g., example.com itself)
- Alias — AWS-specific, can be used at zone apex, free, resolves to AWS resources without an extra DNS lookup