How to Setup Route 53 for your Domain in AWS. In this guide you are going to learn how to configure Route 53 and point your EC2 Instance and route traffic through Route 53.
Route 53 is a scalable DNS (Domain Name System) and named behind the TCP and UDP port 53 where DNS requests are addressed. With Route 53 the users are routed to AWS services or other services. For example, Kinsta uses Google Cloud Platform for hosting services and use AWS Route 53 for DNS management services.
- A running EC2 Instance, if you wish to host your website on AWS. Learn how to create an AWS EC2 instance.
- Assigned a Elastic IP to your EC2 Instance.
- A registered domain name owned by you.
Create Route 53 DNS Zone
Login to your AWS console and navigate to Services >> Networking & Content Delivery and click Route 53.
If you don’t have a domain name you can register one for your business in this screen under Domain registration.
If you already have a domain name you can click Get Started under DNS management.
Now you can create a new hosted zone here.
Click Create Hosted Zone.
In Domain name enter your domain name.
In Type choose Public Hosted Zone.
Now a set of Nameserver (NS) records will get created and assigned for your domain name.
Configure DNS in Domain
Now to make your domain to use Route 53 you need to update the nameservers of your domain name with the one provided here.
To update login to your domain registrar and choose to add custom nameservers and add these four NS records.
Once the update is done the requests to your domain name will get routed through Route 53.
Setup DNS Records
These are some commonly used DNS Records to map your domain name to EC2 Instance or other services.
- A Record – IPv4 address, maps IP of the host with a domain.
- AAAA Record – IPv6 address, mainly used in HTTP(S), SSL Proxy, and TCP Proxy Load balancing.
- CNAME – Alias for one name to another (www.domain.com, points to domain.com)
- MX – Manages where emails should be delivered.
- TXT – Any text content, like domain owner verification text or something like that
For example to route your users to view the website in EC2 Instance you need to create an A record in your DNS zone.
Click Create Record Set.
In the Name leave it blank.
In Type select A – IPv4 address.
In the Value enter the Elastic IP assigned to your EC2 Instance.
Now you have pointed your domain to your EC2 Instance.
Next you need to create a CNAME record for the
www subdomain to point to the Elastic IP address.
Click Create Record Set.
In the Name type www.
In Type select CNAME – Canonical name.
In the Value enter your domain name.
So finally the overall setup looks similar to the one below.
Likewise you can create MX records or TXT records for your domain name.
Now you have learned how to setup and configure Route 53 for your domain name and configure EC2 Instance in Route 53.
Thanks for your time. If you face any problem or any feedback, please leave a comment below.