The phone book of the internet: turns names like google.com into IP addresses.
DNS (Domain Name System) turns a name people can remember, like google.com, into an IP address computers use, like 142.250.x.x.
Computers find each other by IP address. People are bad at remembering numbers like 203.0.113.10, but good at remembering names like shop.com. DNS is the system that does the translation.
| Type | What it holds | Example |
|---|---|---|
| A | A name to an IPv4 address | shop.com β 203.0.113.10 |
| AAAA | A name to an IPv6 address | shop.com β 2001:db8::10 |
| CNAME | A name that is an alias of another name | www.shop.com β shop.com |
| MX | Which servers receive email | shop.com β mail.shop.com (priority 10) |
| NS | Which name servers are in charge | shop.com β ns1.dnshost.com |
| TXT | Free text, used for proofs and email rules | βv=spf1 include:mailer.com ~allβ |
| PTR | An IP back to a name (reverse lookup) | 203.0.113.10 β shop.com |
| SOA | Admin details of the zone | Serial number, refresh times |
shop.com. 300 IN A 203.0.113.10 shop.com. 300 IN AAAA 2001:db8::10 www.shop.com. 300 IN CNAME shop.com. shop.com. 3600 IN MX 10 mail.shop.com. shop.com. 3600 IN TXT "v=spf1 include:mailer.com ~all"
dig shop.com # ask for the A record dig +trace shop.com # walk root β TLD β authoritative nslookup shop.com # works on Windows too
| Term | Meaning in easy words |
|---|---|
| Domain name | The human-friendly name, like shop.com |
| IP address | The number that computers use to find each other |
| Resolver | The server that looks up answers for you (ISP or public, like 8.8.8.8) |
| Root server | Top of the tree. Knows the TLD servers |
| TLD | Top-level domain: .com, .org, .in, .uk |
| Authoritative server | The server that holds the real records for a domain |
| Zone | The set of records for a domain |
| Record | One entry in DNS, such as A, MX or TXT |
| TTL | How many seconds an answer may be cached |
| Registrar | The company you buy a domain from |
| Propagation | The time old cached answers take to expire after a change |
| DNSSEC | Signatures that prove a DNS answer was not faked |
| Port 53 | The port DNS uses, mostly over UDP (and TCP for large answers) |
| Choice | We gain | We lose |
|---|---|---|
| Short TTL | Fast changes and failover | More lookups, more load, slightly slower |
| Long TTL | Fewer lookups, faster | Slow to change or recover |
| Public resolver (8.8.8.8, 1.1.1.1) | Often fast and reliable | A third party sees your lookups |
| DNSSEC | Proof the answer is real | More setup and risk of mistakes |
| DNS over HTTPS (DoH) | Lookups are private from the local network | Harder for networks to filter |