Hosted Zones & Record Types
A, CNAME, Alias, MX, TXT: what each record does and which to use.
1 min read
A hosted zone holds all the DNS records for one domain. Public zones answer the internet, and private zones answer only inside your VPCs.
| Record | Points a name to… | Example |
|---|---|---|
| A | An IPv4 address | notesnap.app → 54.210.33.17 |
| AAAA | An IPv6 address | notesnap.app → 2600:1f18::1 |
| CNAME | Another name | docs.notesnap.app → notesnap.github.io |
| Alias (Route 53 only) | An AWS resource: CloudFront, a load balancer, S3 website, API Gateway… | notesnap.app → d111.cloudfront.net |
| MX | Mail servers | Where email for @notesnap.app goes |
| TXT | Text | Domain verification, SPF/DKIM email settings |
Why Alias beats CNAME on AWS
- A CNAME can't be used at the zone apex (the bare
notesnap.app). Alias can. - Alias records follow the AWS resource's IP changes automatically.
- Alias queries to AWS resources are free.
TTL
Every record has a TTL (time to live): how long resolvers may cache the answer. Long TTLs mean fewer queries. Short TTLs mean changes take effect faster.
Tip
Planning a migration? Lower the TTL (e.g. to 60 seconds) a day before switching. Afterwards the change propagates quickly, and you can raise it again.
Key takeaways
- A/AAAA point to IPs, CNAME to another name, MX to mail servers, TXT holds text.
- Use Alias records for AWS resources: they work at the apex and queries are free.
- Lower TTLs ahead of planned changes.
Check your understanding
Pick an answer to see the explanation.
1. You want the bare domain notesnap.app to point at a CloudFront distribution. Which record?