DEV Community

Ashiq Omar
Ashiq Omar

Posted on

Setup a DNS hosted zone in Route53 in AWS.

Let’s walk through how DNS works in a simple and practical way using AWS.

Step 1: Open Route 53

  1. Start by logging into your AWS Console search for Amazon Route 53 and open it.
  2. Once inside, go to Hosted Zones This is where your domain DNS settings are managed.

Step 2: Create a Hosted Zone

Click on Create Hosted Zone.
Now enter the details:
Domain Name:
Enter your domain name like yourdomain.com. It can be a real domain or just for practice.

Type:
Choose Public Hosted Zone so your domain can be accessed over the internet.
Then click Create Hosted Zone.

Step 3: Understand the Default Records

After creating the hosted zone, AWS automatically creates two records:
NS Record:
These are AWS DNS servers that handle requests for your domain.
SOA Record:
This contains technical and administrative details about your domain.
You don’t need to change these records.

Step 4: Create an A Record

  1. Now you need to connect your domain to your server.
  2. Click Create Record and fill in

Record Name:
You can use www or leave it empty.
Record Type:
A
Value:
Enter your EC2 instance’s public IP address.
Click Create Record.

Step 5: Connect Your Domain to AWS

If you bought your domain from providers like GoDaddy or Namecheap you need to update the nameservers.
Go to your domain provider’s settings and replace their nameservers with the ones provided by Amazon Route 53.

They will look like:
ns-123.awsdns-45.com
ns-678.awsdns-12.net
This step ensures that your domain uses AWS for DNS resolution.

Step 6: Test in Browser
Open your browser and visit:
http://www.yourdomain.com
If everything is set up correctly your EC2-hosted website will load.

How the Flow Works
When a user enters your domain in the browser this is what happens:

  1. User sends a DNS request
  2. Route 53 receives the request
  3. It checks the A record
  4. Returns the EC2 IP address
  5. Browser loads the website

Top comments (0)