Skip to main content

What Is AWS Route 53?

How DNS Works

When you type example.com in a browser:

  1. Your computer asks a DNS resolver (usually your ISP or Google's 8.8.8.8) what IP address maps to example.com
  2. The resolver queries the authoritative name servers for the domain
  3. The name servers return the IP
  4. Your browser connects to that IP

Route 53 acts as those authoritative name servers for your domain.

Hosted Zones

A hosted zone is a container in Route 53 for all DNS records belonging to a domain. When you create a hosted zone for example.com, Route 53 gives you 4 name server (NS) records — you paste these into your domain registrar to hand over DNS authority to Route 53.

ns-123.awsdns-45.com
ns-678.awsdns-90.net
ns-111.awsdns-22.org
ns-999.awsdns-88.co.uk

Hosted zones cost $0.50/month per zone.

Record Types

TypePurposeExample
AMaps a name to an IPv4 addressexample.com → 1.2.3.4
AAAAMaps a name to an IPv6 addressexample.com → 2001:db8::1
CNAMEAliases one name to another namewww.example.com → example.com
ALIASAWS-specific — aliases to AWS resources at the root domainexample.com → d1234.cloudfront.net
MXEmail routingPoints to your mail server
TXTText recordsSPF, DKIM, domain verification
NSDelegates a subdomain to different name servers

CNAME vs. ALIAS

A standard CNAME can't be used at the root domain (example.com) — DNS standards forbid it. ALIAS is Route 53's solution: it behaves like a CNAME but works at the root and resolves inside AWS for zero extra latency.

Use ALIAS when pointing example.com (not a subdomain) to CloudFront, an ALB, or another AWS resource.

Common Setups

Point Root Domain to EC2

Type: A
Name: example.com
Value: <EC2 Elastic IP>
TTL: 300

Point www to Root Domain

Type: CNAME
Name: www.example.com
Value: example.com
TTL: 300

Point Root Domain to CloudFront

Type: A (ALIAS)
Name: example.com
Value: d1abc2def3ghi.cloudfront.net
Routing policy: Simple

Add a Subdomain for Your API

Type: A
Name: api.example.com
Value: <EC2 Elastic IP or Load Balancer>
TTL: 60

TTL (Time to Live)

TTL is how long (in seconds) DNS resolvers cache the record before re-querying. A TTL of 300 means the record is cached for 5 minutes.

  • During migrations: set TTL very low (60s) a day before you change the IP, so changes propagate fast
  • After migration is stable: raise TTL back to 3003600 to reduce DNS query load

Using Route 53 with an External Registrar

If your domain is registered at Namecheap, GoDaddy, or elsewhere:

  1. Create a hosted zone in Route 53 for your domain
  2. Copy the 4 NS record values Route 53 gives you
  3. Go to your registrar → Domain settings → Change nameservers
  4. Paste the Route 53 nameservers and save

DNS propagation takes 0–48 hours (usually under 30 minutes for most resolvers).