Amazon Route 53 DNS

Beginner
14 min read
Updated: Nov 2026
5 examples
Route 53 / DNS / ALB

Definition and Usage

Amazon Route 53 is AWS’s scalable DNS service. You can register domains in Route 53 (or keep a registrar elsewhere), create a public hosted zone, delegate name servers, and publish records that send users to EC2 or an Application Load Balancer.

What is a hosted zone?

A hosted zone is a container for DNS records for a domain (or subdomain) that Route 53 answers authoritatively. Public zones serve the internet; private hosted zones attach to VPCs for internal names.

Registrar vs Route 53

If the domain is registered outside AWS, create the hosted zone anyway, then copy the four NS records into your registrar’s delegation UI. If you buy the domain inside Route 53, delegation is often wired automatically—still verify the hosted zone matches the registered domain.

What you will configure

A public hosted zone, NS delegation, then either an A record to an Elastic IP or an alias A to an ALB, plus optional www records.

After DNS resolves

Add TLS with ACM, redirect HTTP to HTTPS, and normalize www vs apex on the load balancer.

DNS caches take time.

After NS or record edits, allow up to 24–48 hours for full worldwide convergence; many updates appear sooner depending on TTL.

Stable targets only.

Do not point apex A records at ephemeral EC2 public IPs. Use Elastic IP or an ALB alias.

Alias for ALB apex.

Classic DNS forbids CNAME at the zone apex. Route 53 alias A/AAAA is the correct pattern for ELB.

Core Concepts

Terms you will use while configuring DNS:

ConceptMeaning
Hosted zoneContainer for authoritative DNS records for a domain
NS recordsName servers that must match at the registrar for delegation
A recordMaps a name to an IPv4 address
Alias A/AAAARoute 53 record that points at AWS resources such as an ALB
CNAMEMaps a name to another hostname (not for zone apex with other records)
TTLHow long resolvers cache an answer before asking again
ApexThe root of the zone (for example example.com)
DelegationRegistrar NS set that points resolvers at Route 53

Prerequisites

Have these ready before you create records:

  • An AWS account with access to Route 53 and billing enabled for domain registration where required.
  • Optional: an EC2 instance with an Elastic IP, or an ALB DNS name after creating an ALB.
  • Access to your domain registrar if the domain is not registered in Route 53 (to update NS delegation).

Examples

Create a public hosted zone, delegate NS, then point apex DNS at EC2 or an ALB and test resolution.

Example 1 — Create a Public Hosted Zone

Optionally register a domain, then create the zone that will hold your records.

  1. Sign in to the AWS Management Console and open Route 53.
  2. Optional: choose Register domain, search for a name, and complete registration prompts (pricing and TLD availability vary).
  3. Choose Hosted zones → Create hosted zone.
  4. Set Domain name to your apex (for example example.com), type Public hosted zone, then create.
Route 53 console with register domain entry point
Route 53
Route 53 navigation to Hosted zones
Route 53
Create hosted zone button in Route 53
Route 53
Configure public hosted zone domain name and type
Route 53

How It Works

  1. Registration buys the name; the hosted zone holds the answers.
  2. Public zones are queried by internet resolvers after NS delegation.
  3. Route 53 assigns four NS when the zone is created.
  4. Domain name must match what you will delegate at the registrar.

Example 2 — Delegate Name Servers

Point the registrar at Route 53’s authoritative servers.

  1. Open the new hosted zone and note the four NS records.
  2. If the domain is registered outside AWS, paste those NS values into the registrar’s name-server / delegation UI.
  3. If the domain is registered in Route 53, confirm the delegation page already references these servers.
Hosted zone created successfully with NS records listed
Route 53
Updating domain registrar name servers to Route 53 NS
Registrar / Route 53

How It Works

  1. Delegation tells the parent TLD who answers for your zone.
  2. All four NS should match exactly what Route 53 shows.
  3. Propagation depends on prior TTL at the registrar and resolvers.
  4. Wrong NS means the world never sees your new A/alias records.

Example 3 — Point Apex DNS at EC2

Use a raw A record when a single instance with a stable Elastic IP terminates traffic.

  1. Open your hosted zone and choose Create record.
  2. Optional www: create a CNAME (or second A) where the name is www and the value is your apex or another canonical target.
  3. Create an apex A record: leave Record name blank, type A, alias off, value = Elastic IP (not an ephemeral public IP).
  4. Save and wait for resolver caches to refresh.
Hosted zone create record in Route 53
Route 53
Route 53 CNAME record for www subdomain
Route 53
Route 53 A record pointing to EC2 public IPv4
Route 53
Use Elastic IP.

Auto-assigned public IPv4 can change on stop/start and will break hardcoded A records.

How It Works

  1. Apex A maps example.com to one IPv4.
  2. www CNAME is common for a subdomain that follows the apex.
  3. Elastic IP keeps the address stable across instance restarts.
  4. Prefer ALB when you need health checks and multiple backends (next example).

Example 4 — Alias Apex to an Application Load Balancer

For production web stacks, alias the apex to the ALB DNS name.

  1. In the same hosted zone, choose Create record.
  2. Optional www: CNAME or alias for www pointing at your canonical name.
  3. Create an apex alias A: type A, Alias enabled, route traffic to Alias to Application and Classic Load Balancer, pick the Region, select your ALB.
  4. Add AAAA alias as well if you enable IPv6 on the ALB.
Route 53 alias A record to Application Load Balancer
Route 53

How It Works

  1. Alias avoids CNAME-at-apex limits and tracks ALB IP changes.
  2. Health-aware routing can skip unhealthy targets for supported AWS resources.
  3. Prepare listeners first with the target group and ALB guides.
  4. CloudFront can also be an alias target when you front the site with a CDN.

Example 5 — Test Resolution

Confirm apex and www resolve, then load the site over HTTPS when TLS is ready.

  1. Query apex and www with a browser, dig, or nslookup.
  2. Open https://your-domain.example after ACM and HTTP→HTTPS are configured.
  3. Next: normalize www vs apex with www redirection.
Terminal
nslookup your-domain.example
dig your-domain.example +short
Browser showing site served via custom domain
Browser

How It Works

  1. Authoritative answers update quickly in Route 53; caches obey prior TTL.
  2. Lower TTL before cutovers if you need faster rollbacks.
  3. HTTPS failures after correct A/alias usually mean ACM or listener issues.
  4. Health checks / failover are advanced Route 53 options—see a dedicated Route 53 health checks guide.

Edge Cases & Pitfalls

Most DNS outages are wrong NS, ephemeral IPs, or CNAME at apex.

ns

Registrar NS not updated

Records in Route 53 never go live worldwide until delegation matches the hosted zone NS set.

ip

A record to ephemeral public IP

Stop/start changes the address. Use Elastic IP or switch to an ALB alias.

apex

CNAME at the zone apex

Classic DNS forbids it alongside other apex types. Use Route 53 alias A/AAAA for ALB.

ttl

Old answers after a cutover

Resolvers cache for the previous TTL. Lower TTL before migrations when you can.

zone

Hosted zone name typo

A zone for exmaple.com will never serve example.com. Recreate or add the correct zone.

alb

Alias to wrong Region or ALB

Pick the Region and load balancer that actually terminate your listeners and targets.

Key Takeaways

  • Public hosted zone holds records; registrar NS must match for delegation.
  • Alias A/AAAA to an ALB for apex; A to Elastic IP for a single instance.
  • Plan for caching after NS or record edits; lower TTL before big cutovers.
  • Then TLS + redirects: ACM, HTTP→HTTPS, www vs apex.

One line: hosted zone + matching NS, then alias to ALB (or A to Elastic IP).

Frequently Asked Questions

A hosted zone is a container for DNS records for a domain (or subdomain) that Route 53 answers authoritatively. A public hosted zone is served to the internet; private hosted zones are attached to VPCs for internal names.
For the zone apex in Route 53, use an alias A (and AAAA if you use IPv6) to the load balancer DNS name. Alias integrates health-aware routing for supported AWS targets and avoids classic DNS restrictions on CNAME at apex.
Auto-assigned public IPv4 addresses can change when you stop and start an instance unless you associate an Elastic IP. DNS A records should target stable addresses you control.
Yes. Create the hosted zone, copy the four Route 53 name servers, and replace the registrar's delegation with those NS records only.
Classic DNS forbids a CNAME at the zone apex alongside other apex record types. Route 53 alias records express the correct apex behaviour for ELB and many other AWS targets.
Authoritative data in Route 53 updates quickly, but resolvers cache previous answers for the prior TTL. Lower TTLs before a migration if you need faster rollbacks.

Next: canonical hostname

Once apex and www resolve to your load balancer, add listener rules so visitors land on a single preferred hostname.

WWW redirect →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful