Complete Configuration Guide for AWS Route 53
Source: Saiyp | Date: 2025-12-14 16:55:00+08
Route 53 is Amazon Web Services’ (AWS) highly available and scalable Domain Name System (DNS) service. Beyond standard domain name resolution, it deeply integrates with other AWS services—such as EC2, S3, CloudFront, and Elastic Load Balancing (ELB)—to enable intelligent traffic routing, health checks, and failover capabilities.
π Phase 1: Preparation
Before you begin, please confirm the following:
-
You have an AWS account
→ If not, sign up at aws.amazon.com.
→ A credit card is required (even for the Free Tier). -
You own a domain name
→ This can be a domain already registered elsewhere (e.g., GoDaddy, Namecheap), or a new one purchased directly through Route 53. -
You know your DNS resolution targets
→ Examples:- Point
example.comto your EC2 instance’s public IP (54.200.10.5). - Point
www.example.comto a CloudFront distribution.
- Point
βοΈ Phase 2: Host Your Domain in Route 53 (Create a Hosted Zone)
A Hosted Zone is a container for DNS records—similar to “DNS settings” in Alibaba Cloud.
Steps:
- Log in to the AWS Management Console.
- Search for Route 53 in the service bar and open it.
- In the left menu, select Hosted zones.
- Click Create hosted zone.
- Fill in:
- Domain name:
example.com - Type: Usually select Public hosted zone
- Domain name:
- Click Create hosted zone.
β Upon success, Route 53 automatically generates NS (Name Server) and SOA (Start of Authority) records.
β οΈ The NS addresses (e.g., ns-123.awsdns-01.com) are the authoritative name servers you must configure at your domain registrar.
π Phase 3: Delegate Your Domain to Route 53 (Update Name Servers)
This step determines who controls DNS resolution for your domain.
If your domain is registered elsewhere (e.g., GoDaddy):
- Copy the 4 NS record values from your Route 53 hosted zone.
- Log in to your domain registrar’s dashboard.
- Locate Nameservers or DNS Servers settings.
- Replace the default NS records with the 4 AWS NS records.
- Save changes.
If you bought the domain in Route 53:
β No action needed! AWS automatically configures name server delegation.
π Propagation time: Typically minutes to hours; full global sync may take 24–48 hours.
βοΈ Phase 4: Add DNS Records (Resource Records)
Now you can freely configure A, CNAME, MX, and other record types in Route 53.
Example 1: Point root domain to an EC2 public IP
- In your hosted zone, click Create record.
- Configure:
- Record name: Leave blank (represents
@, i.e.,example.com) - Record type:
A – IPv4 address - Value:
54.200.10.5(your server IP) - TTL: Default 300 seconds (adjustable)
- Record name: Leave blank (represents
- Click Create records.
Example 2: Point www to CloudFront (use Alias)
Alias records are a Route 53-exclusive feature that lets you map domains (including root domains) to AWS resources—for free!
- Click Create record.
- Configure:
- Record name:
www - Record type:
A – IPv4 address - Alias: Yes
- Route traffic to: Select CloudFront distribution
- Choose your CloudFront ID from the dropdown (e.g.,
d1a2b3c4d5e6f7.cloudfront.net)
- Record name:
- Click Create records.
β Benefits of Alias records:
- Free (no additional query charges)
- Support root domains (
example.com) pointing directly to CloudFront, ELB, or S3
π Phase 5: Advanced Features (Intelligent Routing)
Route 53 offers multiple Routing Policies for high availability and smart traffic management.
1. Failover Routing
Automatically switch to a backup if the primary fails.
Steps:
-
Create a Health Check:
→ Left menu → Health checks → Create health check
→ Protocol: HTTP/HTTPS/TCP
→ Target: Primary server IP or domain
→ Optional path:/health
→ Save -
Create Primary Record:
→ Record name:@
→ Routing policy: Failover
→ Failover record type: Primary
→ Associate with the health check
→ Value:54.200.10.5 -
Create Secondary Record:
→ Same name:@
→ Routing policy: Failover
→ Failover record type: Secondary
→ Value:54.200.20.10(backup IP)
β When the primary health check fails, Route 53 automatically returns the secondary IP.
2. Geolocation Routing
Route users based on their geographic location.
- US users → US server
- Users in Asia → Singapore server
Example:
- Record A:
- Name:
@ - Policy: Geolocation
- Location: United States
- Value:
54.200.10.5
- Name:
- Record B:
- Name:
@ - Policy: Geolocation
- Location: Asia
- Value:
13.213.10.20
- Name:
- (Optional) Default record for unmatched regions
3. Latency-Based Routing
Route users to the AWS region with the lowest network latency.
- Create one A record per region (e.g.,
us-east-1,ap-southeast-1) - Set Routing policy to Latency
- Select the corresponding AWS Region
- Route 53 automatically returns the IP with the best latency for each user
π‘οΈ Phase 6: Security & Best Practices
| Recommendation | Details |
|---|---|
| TTL | Set to 60–300 seconds for critical services to enable fast failover |
| Health Checks | Apply to all public-facing endpoints to avoid sending traffic to failed instances |
| Alias Records | Always prefer Alias over standard A/CNAME for AWS resources |
| IAM Permissions | Restrict Route 53 modification rights via IAM policies |
| Audit Logging | Enable AWS CloudTrail to log all DNS changes |
β Avoid:
- Using standard A records for ELB/CloudFront (always use Alias)
- Skipping health checks (prevents automatic recovery)
- Setting TTL to 86400 (24 hours)—this severely delays failover
π° Pricing Overview (2025 Reference)
| Item | Cost |
|---|---|
| Hosted Zone | $0.50 / month / domain |
| Standard Queries | $0.40 / million queries |
| Health Checks (HTTP) | $0.50 / month / check |
| Alias Queries | Free |
| Domain Registration | Varies by TLD (e.g., .com ≈ $12/year) |
π‘ Most small websites cost under $1/month in total.
β Verify Your Configuration
Command-line testing:
dig example.com A
nslookup www.example.com
Online tools:
In AWS Console:
- Check if Health Check status is Healthy
- Review CloudWatch Logs (if query logging is enabled)
π― Summary: Core Advantages of Route 53
β
100% SLA – Industry-leading availability guarantee
β
Deep AWS Integration – One-click Alias to CloudFront, ELB, S3
β
Intelligent Routing – Supports failover, geolocation, latency, weighted, and more
β
Pay-as-you-go – No minimum fees; scales from personal projects to enterprise
β
API-Driven – Fully automatable via AWS CLI or SDKs
Ideal for:
- Cloud-native applications (especially fully on AWS)
- Services requiring high availability and auto-failover
- Global architectures with multi-region deployments
If you’re already using AWS, Route 53 is almost always the best—and often the only—recommended DNS solution.