Chapter 9: Domain Names, DNS and Subdomains
9.3 DNS record types you must know
| Record | Purpose | Example (name → value) |
|---|---|---|
| A | Name → IPv4 address | @ → 13.233.10.25 |
| AAAA | Name → IPv6 address | @ → 2406:da1a:... |
| CNAME | Name → another name (alias) | www → example.com |
| MX | Mail servers for the domain (with priority) | @ → 10 mail.example.com |
| TXT | Free text, used for verification, SPF, DKIM | @ → "v=spf1 include:_spf.google.com ~all" |
| NS | Which name servers are authoritative | @ → ns51.domaincontrol.com |
| SOA | Start of authority: zone admin info and serials | created automatically |
| CAA | Which certificate authorities may issue certificates | @ → 0 issue "letsencrypt.org" |
| Alias (Route 53) | Like a CNAME but allowed at the apex, for AWS resources | @ → load balancer / CloudFront |
CNAME rules
A CNAME cannot be used at the apex (@), and a name with a CNAME can't have any other record. For the root domain always use an A record (or a Route 53 Alias). Use CNAME for names like www.
TTL and "propagation"
TTL (Time To Live) is how many seconds resolvers may cache a record. With TTL 3600, a resolver that looked up your old IP may keep using it for up to one hour after you change it. That delay is what people call DNS propagation. Nothing is actually pushed around the world; old cached answers simply expire.
- Before a planned change (e.g. moving to a new server), lower the TTL to
300(5 minutes) a day earlier. - After the change is stable, raise it again (e.g.
3600) to reduce lookups. - A new domain's name server change at the registrar can take longer, sometimes a few hours, because TLD servers and resolvers cache NS records with long TTLs.