Home › Networking › DNS
Networking

DNS

DNS is the internet's phone book. You type a name like example.com; DNS turns it into the IP address your computer actually connects to.

How a lookup works

Your computer asks a resolver, which asks the root servers, then the .com servers, then the server responsible for the domain itself, caching the answer along the way so the next lookup is instant.

Record types

A maps a name to an IPv4 address, AAAA to IPv6, CNAME points one name at another, MX names the mail servers, and TXT holds arbitrary text (often used to prove you own a domain).

example.com.      A      93.184.216.34
www.example.com.  CNAME  example.com.

TTL and caching

Every record has a time-to-live that says how many seconds it may be cached. Lower it before you plan to change a record, so the change spreads quickly.

Keep reading: HTTP  ·  Caching  ·  Python