DNS translates domain names to IP addresses. One of the most important internet protocols.
How DNS Works¶
Query chain: local cache → OS resolver → recursive DNS → root server → TLD server (.com) → authoritative server.
Record Types¶
- A — IPv4
- AAAA — IPv6
- CNAME — alias
- MX — mail
- TXT — SPF, DKIM, verification
- NS — nameserver
- SRV — service discovery
Commands¶
dig example.com dig example.com MX dig +trace example.com dig @8.8.8.8 example.com
TTL and Caching¶
TTL = how long the resolver caches a response. Low = fast changes, more queries. Typically 300-3600s.
DNSSEC¶
Cryptographic signatures of DNS responses against spoofing.
dig +dnssec example.com
DNS is Fundamental¶
Understanding DNS is essential. Learn dig and the resolution chain.