Managing DNS with Route 53 Hosted Zones and Alias Records
This lesson explains Route 53, AWS's DNS service and domain registrar with a 100% availability SLA, and how hosted zones, records and alias records work.
Learning outcomes
After completing this lesson, you will be able to:
- Distinguish public and private hosted zones.
- Choose between alias and CNAME records.
- Explain how TTLs affect DNS changes.
Hosted zones
A hosted zone holds the DNS records for a domain, and it is either public or private. A public hosted zone answers queries from anywhere on the internet, so it holds the names customers use, such as www.example.com. A private hosted zone answers only queries from the VPCs associated with it, which must have DNS resolution and DNS hostnames enabled. It gives internal resources, such as databases, names that are invisible from outside. The following table summarises the two types.
| Zone | Answers |
|---|---|
| Public hosted zone | Queries from the internet |
| Private hosted zone | Only associated VPCs (DNS hostnames and resolution enabled) |
Same-named public and private zones give different answers inside and outside the VPC (split-horizon DNS), e.g. api.example.com resolving privately inside. Common records: A, AAAA, CNAME, MX, TXT, NS, SOA, CAA, SRV.
Alias records or CNAME
Both alias records and CNAME records point one name at another, but they behave differently. A CNAME record maps a name to any other host name, inside or outside AWS. DNS rules forbid a CNAME at the zone apex, the domain itself, so example.com cannot be a CNAME, and each query that Route 53 answers for it is charged.
An alias record is a Route 53 extension that points a name at an AWS resource, such as a load balancer, a CloudFront distribution, an API Gateway custom domain, an S3 website, a Global Accelerator, an interface endpoint or another record in the same zone. Route 53 resolves the target itself and returns its current IP addresses as an ordinary answer, so the record follows the target's address changes automatically. Alias records work at the zone apex, and queries for alias records that point to AWS resources are free. The following table summarises the differences.
The following diagram compares how the two record types resolve.

Alias or CNAME?
TTLs and moving DNS
Each DNS record has a time to live (TTL), which sets how long resolvers may cache the answer. A long TTL reduces query volume and cost, but means that changes take that long to reach all clients, so the TTL is lowered well before a planned change, such as a migration, and raised again afterwards.
Route 53 can also register domains and supports DNSSEC signing, but domain registration and DNS hosting are separate: a domain registered elsewhere can be hosted in Route 53, and the reverse. To move DNS hosting to Route 53, a team creates a hosted zone, copies the existing records into it, lowers the TTLs, and then updates the name servers at the registrar to Route 53's.
Moving DNS to Route 53
Pointing the apex domain at a load balancer
A company wants both example.com and www.example.com to reach its ALB. A CNAME record works for www, but the DNS standard does not allow a CNAME at the zone apex (example.com).
| Record | Type | Notes |
|---|---|---|
example.com | Alias A record to the ALB | Allowed at the apex; free queries; follows the ALB's IP changes |
www.example.com | Alias A record to the ALB (or a CNAME) | Alias preferred: free and faster to resolve |
Alias records are a Route 53 feature for AWS targets such as ALBs, CloudFront distributions, API Gateway and S3 website endpoints. Whenever a question involves the apex of a domain and an AWS resource, the answer is an alias record.
What is the difference between a public and a private hosted zone?
Show answer
A public hosted zone answers queries from the internet. A private hosted zone answers only queries from the VPCs associated with it.
Exam Tips
Remember for the exam
- To point example.com, the zone apex, at a load balancer, use an alias record; a CNAME is not allowed at the apex.
- For internal DNS names for resources in VPCs, use a private hosted zone.
- Alias queries to AWS resources are free.
- When the same name must resolve differently inside the VPC and on the internet, use public and private hosted zones (split horizon).
- For a domain registered elsewhere, point its name servers to the Route 53 hosted zone.