AWS Basic
- AWS Intro
- Launch EC2 Instance
- Elastic IP
- AWS Target Group
- AWS Application Load Balancer
- AWS Route53
- Amazon Certificate Manager
- Redirect HTTP to HTTPs
- Redirect WWW to Non WWW
- AWS Cloudfront
- Download S3 to Local
- Install Node.js & NPM in EC2
AWS Connection
AWS Wordpress
AWS Deploy App
Exploring AWS Route 53
Photo Credit to CodeToFun
🙋 Introduction
Amazon Route 53 is a scalable and highly available domain name system (DNS) web service provided by Amazon Web Services (AWS).
In this tutorial, we will explore the key steps of using Route 53, including buying a domain, creating a hosted zone, and configuring an Application Load Balancer.
📚 Prerequisites
Before you begin, ensure you have an AWS account and access to the AWS Management Console.
💵 Buying a Domain
Let's explore the process of purchasing a domain name on AWS.
Navigate to the AWS Management Console and sign in.
Open the Route 53 console and click on Register a domain.
Photo Credit to CodeToFun
Enter the desired domain name and select the TLD (Top-Level Domain), such as .com or .net.
Follow the prompts to complete the domain registration process.
🖋️ Creating a Hosted Zone
Follow these steps to create a Hosted Zone.
In the Route 53 console, choose Hosted zones from the navigation pane.
Photo Credit to CodeToFun
Click on Create Hosted Zone.
Photo Credit to CodeToFun
Configure the hosted zone as follows.
- Domain name: Enter the domain name that you purchased earlier.
- Description: This is optional.
- Type: Choose Public hosted zone.
Photo Credit to CodeToFun
Now, click on the create hosted zone button
Congratulations! We have successfully created the hosted zone.
Photo Credit to CodeToFun
Copy the four Name Server (NS) values from the hosted zone and paste them into your registered domain name settings (in this case, quizarmy.com).
Photo Credit to CodeToFun
Congratulations! We have successfully created and configured a hosted zone for our domain name.
🔧 Configuring EC2 to Domain Name
You can configure either your EC2 instance to the domain via a hosted zone or your Application Load Balancer to the domain via a hosted zone.
Note: Skip this section if you want to configure an Application Load Balancer for your domain.
In this section, we will learn how to configure an EC2 instance to connect to the domain via a hosted zone.
Go to Hosted Zone and then click on Create Record.
Photo Credit to CodeToFun
Create a CNAME record type for our domain.
In my case, I will create a CNAME record for quizarmy.com.
Creating a CNAME record with the record type www.quizarmy.com and the value quizarmy.com means that the www subdomain is being aliased to the main domain.
Photo Credit to CodeToFun
Now, click on Create records.
Create A type record for our domain as follows:
- Record name: Leave it blank.
- Record type: A – Routes traffic to an IPv4 address and some AWS resources.
- Alias: No (switch off the checkbox).
- Route traffic to: Public IPv4 address of your EC2 instance.
Now, click on create records
Photo Credit to CodeToFun
Congratulations! We have successfully configured our EC2 instance for the Hosted Zone.
🔧 Configuring Application Load Balancer to Domain Name
You can configure either your Application Load Balancer to the domain via a hosted zone or your EC2 instance to the domain via a hosted zone.
Note: Skip this section if you want to configure an EC2 instance for your domain.
In this section, we will learn how to configure an Application Load Balancer to connect to the domain via a hosted zone.
Go to Hosted Zone and then click on Create Record.
Photo Credit to CodeToFun
Create a CNAME record type for our domain.
In my case, I will create a CNAME record for quizarmy.com.
Creating a CNAME record with the record type www.quizarmy.com and the value quizarmy.com means that the www subdomain is being aliased to the main domain.
Photo Credit to CodeToFun
Now, click on Create records.
Create A type record for our domain as follows:
- Record name: Leave it blank.
- Record type: A – Routes traffic to an IPv4 address and some AWS resources.
- Alias: Yes (switch the checkbox).
- Route traffic to:
- Alias to Application and Classic Load Balancer
- your-hosted-region
- your-dns-name
Now, click on create records
Photo Credit to CodeToFun
Congratulations! We have successfully configured our Application Load Balancer for the Hosted Zone.
🕵️♂️ Testing the Configuration
Let's test whether our domain quizarmy.com is working perfectly or not by following the steps below:
- Open a web browser and enter your domain name
Kudos! Our domain name is operational and serving our application through either an Application Load Balancer or an EC2 instance.
Photo Credit to CodeToFun
🎉 Conclusion
Congratulations! You've successfully explored AWS Route 53, including buying a domain, creating a hosted zone, and configuring an Application Load Balancer and EC2 instance.
This setup allows you to efficiently manage your domain and distribute incoming traffic across multiple instances or services.
Remember to adjust security settings and optimize configurations based on your specific requirements.
🤯 Fun Fact
Did you Know?
It may take up to 24 hours to change the name servers for the domain.
👨💻 Join our Community:
Author
For over eight years, I worked as a full-stack web developer. Now, I have chosen my profession as a full-time blogger at codetofun.com.
Buy me a coffee to make codetofun.com free for everyone.
Buy me a Coffee
If you have any doubts regarding this article (Exploring AWS Route 53), please comment here. I will help you immediately.