Networking · 07 · 4 min read
DNS
The phone book of the internet: it turns names like rahimly.com into IP addresses.
What happens when you type a name
- 1Your device checks its own cache first.
- 2If not found, it asks a resolver (usually your ISP, 1.1.1.1 or 8.8.8.8).
- 3The resolver asks a root server → the .com server → rahimly.com’s own name server.
- 4The answer (an IP address) comes back and is cached for a while (TTL).
Common record types
| Record | Meaning |
|---|---|
| A | Name → IPv4 |
| AAAA | Name → IPv6 |
| CNAME | Alias to another name |
| MX | Mail server for the domain |
| TXT | Text — e.g. SPF and verification |
| NS | Which servers answer for the domain |
Port and security
Classic DNS uses port 53 (mostly UDP) and is unencrypted, so anyone on the path can see which sites you look up. DNS over HTTPS (DoH) and DNS over TLS (DoT) fix that.