Amazon Route 53 is a highly available and scalable cloud Domain Name System (DNS) web service. It effectively connects user requests to infrastructure running in AWS—such as EC2 instances, Load Balancers, or S3 buckets—and can also be used to route users to infrastructure outside of AWS.
Beyond simple domain registration, Route 53 is a powerful traffic management tool that can route users based on latency, health, and geography.
How DNS Works: The Journey of a Query
Before diving into Route 53, it helps to visualize what happens when a user types www.amazon.com into their browser.

- Recursive Query: The user's computer asks a Recursive Resolver (usually provided by your ISP or Google DNS 8.8.8.8) "What is the IP address for www.amazon.com?"
- Root Server: The resolver asks a Root Nameserver (.) "Who handles .com?"
- TLD Server: The resolver asks the Top-Level Domain (TLD) server for .com, "Who handles amazon.com?"
- Authoritative Nameserver (Route 53): The resolver finally asks the Route 53 Nameserver (the authority for amazon.com), "What is the IP for
www?" - Response: Route 53 returns the IP address (e.g.,
192.0.2.44) to the resolver, which sends it to the user.
Routing Policies: Controlling Traffic Flow
Route 53's power lies in its routing policies. You can choose how Route 53 answers DNS queries.
Simple Routing: "One-to-one." Use this for a single resource that performs a given function.
- Use Case: Best for small applications or when only one resource is available to serve traffic.
- Example: A company website hosted on a single EC2 instance.
Weighted Routing: "Split testing." Route traffic to multiple resources in proportions you specify (e.g., 80% to V1, 20% to V2).
- Use Case:Ideal for A/B testing, gradual rollouts, or balancing traffic between versions.
- Example: 80% of traffic goes to version 1 of your app, while 20% goes to version 2 for testing new features.
Latency Routing: "Fastest response." Use when you have resources in multiple AWS Regions. Route 53 directs users to the region with the lowest network latency for them.
- Use Case: Improves performance for global applications by directing users to the closest region.
- Example: A user in India is routed to the Mumbai region, while a user in Germany is routed to Frankfurt.
Failover Routing: "Disaster recovery." You have a primary and a secondary resource. Route 53 monitors the health of the primary; if it fails, traffic automatically shifts to the secondary.
- Use Case: Ensures high availability and business continuity during outages.
- Example: Primary web server in US-East, backup server in US-West.
Geolocation Routing: "Local content." Route traffic based on the geographic location of your users (e.g., users in France go to French servers).
- Use Case: Deliver localized content, comply with regional regulations, or customize user experience.
- Example: Users in France are directed to French-language servers, while users in Japan are routed to servers with Japanese content.
Geoproximity Routing: "Traffic bias." Route traffic based on the physical distance between your users and your resources.
- Use Case: Useful for balancing load between regions or directing more traffic to a preferred location.
- Example: Even if a user is closer to Region A, you can bias traffic toward Region B if Region A is under heavy load.
Multivalue Answer: "Simple load balancing." Route 53 returns up to 8 healthy records selected at random.
- Use Case: Provides basic load balancing and redundancy without needing a full-fledged load balancer.
- Example: A DNS query for your domain returns several IP addresses of healthy servers, and the client picks one to connect to.
Let us walk through the process of troubleshooting common DNS issues. For example, a customer just transferred the domain "awskcvideos.com" to Route53 and cannot resolve records in their hosted zone after completing the transfer. For DNS records to resolve properly after transferring or registering a domain on Route53, the Route53 name servers on your hosted zone need to match the name servers on the Registered Domain section on the Route53 console. Here's how you verify this.
Step 1: After you sign an AWS management console, navigate to the Amazon Route53 console.
Step 2: In the navigation panel, choose Registered Domains.
Step 3: Click the desired domain name.
Step 4:Take note of the four nameservers.
Step 5: In the navigation panel choose the hosted zone and click the domain name.
Step 6: Take note of the four name servers in the hosted zone and verify the name servers listed in both sections marked.
In this case, the customer with the domain "awskcvideos.com" will not be able to resolve any record in their hosted zone. The solution is to update the nameservers in the registered domain section with the nameservers in their Route53 hosted zone.
Troubleshooting Common DNS Issues
When DNS fails, it can be frustrating. Here is how to debug the most common errors.
1. Domain Transferred but Not Resolving
Scenario: You transferred my-site.com to Route 53, but it's down. Fix: Verify your Nameservers (NS).
- Go to the Registered Domains section in Route 53 and note the 4 name servers listed there.
- Go to your Hosted Zone and look at the NS record.
- These must match. If the Hosted Zone lists different NS records than the Registered Domain, the internet doesn't know which phone book to look in. Update the Registered Domain to use the Hosted Zone's name servers.
2. SERVFAIL Error
Meaning: The DNS server was unable to process this query due to a problem with the authoritative nameserver.
- Check if DNSSEC is enabled but misconfigured. This is a common culprit.
- Verify that your firewall or NACLs aren't blocking UDP port 53.
3. NXDOMAIN Error
Meaning: "Non-Existent Domain." The domain name doesn't exist.
- Check for typos in your record set.
- Ensure you created the record in the correct Hosted Zone.
- If using a Private Hosted Zone, ensure you have associated the correct VPC with it.

