1. What is DNS?
- DNS = Domain Name System
- Think of it as the phonebook of the internet.
- It translates human-readable domains (
example.com) into IP addresses (93.184.216.34) that computers use.
2. How DNS Works (Step by Step)
When you type www.example.com:
- Browser/OS cache → Checks if it already knows the IP.
- DNS Resolver (usually your ISP or 8.8.8.8) → Starts the query.
- Root DNS Server → Says: “I don’t know, but .com servers do.”
- TLD Server (.com) → Says: “Ask the authoritative server for example.com.”
- Authoritative DNS Server → Responds with the final IP address.
- Browser connects to that IP.
3. DNS Record Types (Important for Pentesting)
- A record → Maps domain to IPv4 (e.g.,
example.com → 93.184.216.34).
- AAAA record → Maps domain to IPv6.
- CNAME → Alias for another domain (useful for subdomain takeovers).
- MX record → Mail servers for the domain.
- TXT record → Arbitrary text (often used for SPF, DKIM, DMARC).