How to Point a Domain to AWS EC2 Instance

In this post we will see how to point a domain to AWS EC2 instance
In the below example we have taken the Godaddy domain and an AWS EC2 instance.

Step -1 Register your custom domain on Godaddy2

Step -2 Open your EC2 instance on AWS

AWS Console

 

Step -3 Copy the Public IP XXX.XXX.XXX.XXX

Public IP
Step -4 Login to your Godaddy account and select the domain which you want to use on AWS and launch it.

Domain
Step -5 Go to DNS zone file and click on edit button and click on the add record
button and add A Record host and paste the IP address of the AWS EC2 and save the file

EC2 IP in Domain host

Step -6 Now open the AWS instance and go to Route 53 tab and click on the Create Hosted zone button

Route53
Step -7 Fill the Godaddy domain in the Domain Name field and save the zone
Fill godaddy domain in the domain name field and save the zone
Step -8 Click on the Checkbox against the created hosted zone and click on the Go to record Sets button

click on the Checkbox against the created hosted zone and click on the Go to record Sets button
Step -9 Click on the checkbox against the type NS and add the public DNS of ec2 instance and save the record set

Click on the checkbox against the type NS and add the public DNS of ec2 instance and save the record set
Step -10 Now click on the Create record set button and the CName from the drop down and fill the Elastick Beanstalk url like abc.elasticbeanstalk+.com and create the record set

Now click on the Create record set button and the CName from the drop down and fill the Elastick Beanstalk url like abc.elasticbeanstalk+.com and create the record set