DEV Community

Jonah Blessy
Jonah Blessy

Posted on • Edited on

Setup a DNS hosted zone in Route53 in AWS.

To connect your domain to your server using Route 53, we first go to the AWS Console and open the Route 53 service. Here, we create something called a hosted zone, which basically manages all the DNS records for our domain. While creating it, we enter the domain name (I have used jonahblessy.com) and select the type as a public hosted zone since we want it to be accessible over the internet.

Once the hosted zone is created, AWS automatically adds a few default records like NS (Name Server) and SOA (Start of Authority). These are important for DNS to work properly, so we usually don’t touch them.

Next, we need to add our own DNS record to point the domain to our EC2 server. Inside the hosted zone, we create a new record. We choose type A which maps a domain to an IPv4 address, give it a name like www, and set the value as the public IP address of our EC2 instance.

After saving this, we don’t see the change instantly because DNS needs time to update everywhere. This is called propagation, and it usually takes a few minutes, but in some cases it can take up to 48 hours.

Once propagation is done, whenever someone enters the domain in the browser, Route 53 resolves it to the EC2 IP address, and the request reaches our server.


Top comments (0)