How to Set Up Route 53 in AWS for an Existing Domain
Route 53 setup for an existing domain has four concrete steps: create a public hosted zone, add DNS records pointing to your AWS infrastructure, verify those records work before touching anything live, then update the nameservers at your registrar to complete the cutover. This page walks through all four with CLI examples and a propagation check at the end.
Simple explanation
DNS for a domain works in two separate layers, and beginners often confuse them.
The first layer is who answers DNS queries for your domain. That is controlled by nameservers, which are set at your domain registrar. Right now, your registrar’s own nameservers answer queries for your domain.
The second layer is what those answers say. That is controlled by DNS records: A records, CNAME records, MX records, and so on. Those records live in a hosted zone, which is a container holding all the records for a domain.
Setting up Route 53 means creating a hosted zone in Route 53 (putting your records into AWS), then changing the nameservers at your registrar so the internet starts asking Route 53 instead of your registrar. Many people do only one of those steps and then wonder why DNS is not working. Both are required.
Imagine DNS like a two-part phone system. The nameservers are like a national directory service that tells callers “for this company, look in the Route 53 directory.” Your DNS records are the directory itself, listing the specific address for your domain. Setting up Route 53 means creating a new directory with correct entries in it, then telling the national service to start sending callers there. If you only create the directory but never update the national service, no one ever gets redirected to it. The directory exists, it is correct, and it is completely unused.
How Route 53 setup works
- Create a hosted zone. Route 53 assigns four nameservers to the zone and creates NS and SOA records automatically.
- Add DNS records. Add A, CNAME, or Alias records pointing to your ALB, EC2 instance, or other AWS resource. Nothing live changes yet.
- Test Route 53 directly. Query Route 53’s nameservers directly to confirm records are correct before any traffic moves.
- Change nameservers at your registrar. Replace the registrar’s nameservers with the four Route 53 nameservers. This is the cutover. From this point, new DNS queries go to Route 53.
- Wait for resolver caches to expire. Resolvers worldwide cache the old nameservers until their TTL expires. Most catch up within a few hours; full propagation takes 24 to 48 hours.
Steps 1 through 3 are completely safe to take your time on. Nothing changes for live users until you complete step 4. You can create the hosted zone, add records, and run tests over hours or days without affecting anyone. Only step 4 moves traffic.
When to use this guide
This page is the right fit if you:
- Have a domain already registered somewhere (Namecheap, GoDaddy, Cloudflare Registrar, etc.)
- Want to move DNS management to Route 53
- Need to point the domain at an Application Load Balancer, EC2 instance, or other AWS resource
This page is not the right fit if you:
- Need to understand DNS record types, TTLs, and routing policies. That is covered in DNS with Route 53 explained.
- Want DNS that only resolves inside a VPC, not on the public internet. See private hosted zones.
- Need global traffic routing with latency-based or failover policies. See global load balancing with Route 53.
Before you start
Run through this checklist before opening your terminal:
| Question | What you need |
|---|---|
| Do you own the domain? | Access to your registrar’s DNS or nameserver settings panel |
| What is your domain pointing at? | ALB DNS name or EC2 Elastic IP. Have it ready before step 2. |
| Do you need HTTPS? | An ACM certificate attached to your load balancer. Covered in SSL certificates with ACM. |
| Is this public or internal only? | If internal-only (VPC DNS), use private hosted zones instead of this guide. |
Common setup paths
The record type depends on what you are pointing the domain at:
| Target | Record type | Notes |
|---|---|---|
| Application Load Balancer | Alias A record | Free to query, works at the zone apex, auto-tracks ALB IP changes |
| EC2 with Elastic IP | Standard A record | Set TTL manually; update the record if the IP ever changes |
| Internal VPC services | Private hosted zone | Not a public DNS case. See private hosted zones. |
Step 1: Create a public hosted zone
A hosted zone is Route 53’s container for all DNS records under your domain. Create one for your domain name:
aws route53 create-hosted-zone \
--name example.com \
--caller-reference "unique-string-$(date +%s)"The response includes a hosted zone ID in the form /hostedzone/Z1234567890ABCDEF1234. Copy that value. Every subsequent command needs it.
# View the NS records Route 53 assigned to your hosted zone
aws route53 list-resource-record-sets \
--hosted-zone-id Z1234567890ABCDEF1234 \
--query "ResourceRecordSets[?Type=='NS'].ResourceRecords[].Value" \
--output textThis prints the four Route 53 nameservers for your zone, something like ns-123.awsdns-15.com, ns-456.awsdns-39.net, and so on. Write these down. You will enter them at your registrar in step 4.
Creating the hosted zone does not affect your live domain. Your registrar’s nameservers are still authoritative. Build out all your records in Route 53 and test them at any pace before completing the cutover.
Step 2: Add DNS records
ALB path (recommended)
If you are pointing to an Application Load Balancer, use Alias A records. Alias records are free to query, work at the zone apex (the root domain, not just subdomains), and automatically track ALB IP changes without TTL management.
aws route53 change-resource-record-sets \
--hosted-zone-id Z1234567890ABCDEF1234 \
--change-batch '{
"Changes": [
{
"Action": "CREATE",
"ResourceRecordSet": {
"Name": "example.com",
"Type": "A",
"AliasTarget": {
"HostedZoneId": "Z35SXDOTRQ7X7K",
"DNSName": "my-alb-123456789.us-east-1.elb.amazonaws.com",
"EvaluateTargetHealth": true
}
}
},
{
"Action": "CREATE",
"ResourceRecordSet": {
"Name": "www.example.com",
"Type": "A",
"AliasTarget": {
"HostedZoneId": "Z35SXDOTRQ7X7K",
"DNSName": "my-alb-123456789.us-east-1.elb.amazonaws.com",
"EvaluateTargetHealth": true
}
}
}
]
}'The HostedZoneId inside AliasTarget is not your hosted zone. It is a fixed AWS-provided value that identifies the ALB’s own hosted zone. For ALBs in us-east-1 that value is Z35SXDOTRQ7X7K. It varies by region and resource type. Using the wrong value causes the Alias record to fail with no useful error message.
EC2 Elastic IP path (alternative)
If you are pointing to an EC2 instance with an Elastic IP, use a standard A record with a TTL:
aws route53 change-resource-record-sets \
--hosted-zone-id Z1234567890ABCDEF1234 \
--change-batch '{
"Changes": [{
"Action": "CREATE",
"ResourceRecordSet": {
"Name": "example.com",
"Type": "A",
"TTL": 300,
"ResourceRecords": [{"Value": "54.0.0.100"}]
}
}]
}'Unlike Alias records, a standard A record does not track IP changes automatically. If you reassign the Elastic IP, update the record manually. For most production workloads, placing an Application Load Balancer in front of your EC2 instances is the better pattern. It gives you health checks, TLS termination, and the ability to scale horizontally.
Step 3: Verify records before cutover
Before touching nameservers at your registrar, confirm that your Route 53 records are correct by querying Route 53 directly. This bypasses your registrar entirely and lets you verify the setup without affecting any live traffic.
# Query Route 53's own nameserver directly
# Use one of the NS values from step 1
dig example.com @ns-123.awsdns-15.com
# On Windows without dig:
nslookup example.com ns-123.awsdns-15.comIf the response shows the correct IP address or ALB DNS name, the Route 53 side is ready. If the response is wrong or empty, fix the records in Route 53 now, before any live traffic is affected.
Once you update nameservers in step 4, live traffic starts moving immediately. Fixing a misconfigured record after cutover means downtime for real users. Spending two minutes here prevents that entirely.
Step 4: Update nameservers at your registrar
This is the cutover. Log into your registrar and find the nameserver settings for your domain, usually under “DNS Settings”, “Nameservers”, or “Name Server Management”. Replace all existing nameservers with the four values from your Route 53 hosted zone.
Do not enter only two or three of the four Route 53 nameservers and leave the others as your registrar’s old values. Partial nameserver sets cause inconsistent DNS resolution: some queries reach Route 53, others reach the old DNS, and the result is unpredictable. Replace the complete set.
After saving, propagation begins. Resolvers that cached the old NS records will continue using them until those cached TTLs expire. Most resolvers catch up within a few hours. Full global propagation takes up to 24 to 48 hours.
# Check which nameservers are authoritative right now
dig NS example.com @8.8.8.8
# Check that your A record resolves correctly via a public resolver
dig example.com @8.8.8.8When both commands return Route 53 nameservers and your correct IP or ALB name, the cutover is complete for that resolver. If propagation seems stuck, see troubleshooting network issues for DNS debugging steps.
Route 53 setup vs related Route 53 topics
Route 53 covers several distinct capabilities. Here is where this page fits:
- Route 53 setup (this page). Moving an existing domain’s DNS authority to Route 53 and completing the nameserver cutover. The outcome is a working public hosted zone with records pointing at your infrastructure.
- DNS with Route 53. Concepts: record types, TTLs, routing policies, health checks, weighted routing. Read this to understand how Route 53 DNS works beyond a basic setup.
- Private hosted zones. DNS that only resolves inside a VPC. Used for internal service names that should never appear on the public internet. A completely separate use case from this page.
- Global load balancing with Route 53. Advanced routing across multiple regions using latency-based, failover, or geolocation policies. Builds on top of the basic setup covered here.
Optional next steps after setup
HTTPS with ACM
If your ALB is serving HTTP after setup, add HTTPS by requesting a free certificate from AWS Certificate Manager. ACM validates domain ownership through a CNAME record you add to your Route 53 hosted zone, then issues the certificate within minutes. Attach it to your ALB’s HTTPS listener. The certificate renews automatically. Full walkthrough in SSL certificates with ACM.
# Request a wildcard certificate covering *.example.com and example.com
aws acm request-certificate \
--domain-name "*.example.com" \
--subject-alternative-names "example.com" \
--validation-method DNSACM returns a CNAME record to add to your hosted zone for validation. Once Route 53 has the CNAME, the certificate issues automatically, usually within a few minutes.
DNSSEC
DNSSEC adds cryptographic signatures to DNS responses, allowing resolvers to verify that answers have not been tampered with in transit. Enabling it requires creating a Key Signing Key in Route 53, enabling signing on the hosted zone, and adding a DS record at your registrar. It is optional for most applications but worth enabling for domains handling authentication flows or financial data.
Common beginner mistakes
Creating the hosted zone and expecting DNS to work. The hosted zone is a container with records in it. DNS traffic does not flow to Route 53 until you update nameservers at your registrar. Both steps are required. The Route 53 console says “created successfully” and gives no indication that the registrar step is still missing.
Using the wrong ALB HostedZoneId in Alias records. The
HostedZoneIdinside an AliasTarget is not your own hosted zone ID. It is a fixed per-region AWS value for the ALB. Using the wrong value causes the Alias record to fail silently with no useful error message.Checking propagation before the old NS TTL expires. Running
digimmediately after the nameserver update still returns cached old results. Wait for the TTL on the old NS records to expire before concluding that propagation has failed.Accidentally deleting the auto-created NS and SOA records. Route 53 creates these automatically when the hosted zone is created. Deleting the NS record means external resolvers can no longer find your zone at all. Restore them from the Route 53 console if this happens.
Mixing Route 53 nameservers with the registrar’s old nameservers. Partial nameserver updates cause inconsistent DNS resolution. Always replace all nameservers with the complete set of four Route 53 values.
Summary
- Route 53 setup requires two mandatory parts: creating a hosted zone with DNS records, and updating nameservers at your registrar. Completing only one is the most common mistake.
- Use Alias records for ALBs. They are free, work at the zone apex, and track IP changes automatically.
- Test Route 53 by querying its nameservers directly before making any live cutover at your registrar.
- After updating nameservers, full propagation takes up to 24 to 48 hours depending on cached TTLs worldwide.
- HTTPS with ACM and DNSSEC are separate optional steps. Tackle them after the core setup is working.
Frequently asked questions
Why doesn't my domain resolve after I created a hosted zone?
Creating a hosted zone in Route 53 does not move your DNS. Your domain still resolves through your registrar's nameservers until you replace them with the four NS values Route 53 assigned to your hosted zone. That nameserver update at your registrar is the actual cutover. Without it, Route 53 is completely bypassed.
Do I need to register my domain through Route 53?
No. You can keep your domain at any registrar (Namecheap, GoDaddy, Cloudflare, etc.) and still use Route 53 for DNS. The only required step is updating the nameservers at your registrar to the four values Route 53 assigns to your hosted zone. Domain registration and DNS management are independent.
How long do nameserver changes take to propagate?
Most resolvers pick up the change within a few hours, but full global propagation takes up to 24 to 48 hours. The delay depends on the TTL of the old NS records cached by resolvers worldwide. During this window, some users may still reach the old DNS. This is normal and expected.
What is the difference between Route 53 records and registrar nameservers?
Route 53 records (A, CNAME, Alias, MX, etc.) say where to send traffic for your domain. Registrar nameservers tell the internet which DNS service to ask in the first place. You need both: correct records in Route 53, and nameservers at your registrar pointing to Route 53.
Should I use a public hosted zone or a private hosted zone?
Use a public hosted zone if you want the domain resolvable from the internet, which is the standard case for websites and APIs. Use a private hosted zone if you only need DNS resolution inside a specific VPC, such as for internal service names that should never be public.