bluehost-banner
How to connect EC2 instance with GoDaddy Domain

How to connect EC2 instance with GoDaddy Domain

In this tutorial, you'll learn about how to connect applications hosted on AWS EC2 with the Godaddy domain using the Route53 service.

Before starting this tutorial make sure your application should be accessible from public IP or public DNS which is available in EC2.

Also read,

So let's get started...

How to connect EC2 instance with GoDaddy Domain

As public IP or Public DNS provided by ec2 will keep changing while you always start/stop or restart the instance, and we need to provide this IP address for connecting domain but if IP address changes then it will stop working.

So, to overcome this problem AWS provided an Elastic IP solution that provides static IP which won't change during server restart.

Create Elastic IP in AWS:

Go to your EC2 section and select your running instance

From the left side, menu select Elastic IPs under Network & Security menu

Then click on the 'Allocate Elastic IP address' address button

Elastic-IP-addresses
Elastic-IP-addresses

Click on Allocate button

Now you have allocated IP address, now you need to connect this created elastic IP with your EC2 instance, so select elastic IP and from the Actions menu choose Associate Elastic IP Adress,

Then select your running EC2 instance from the list and your instance will be associated with your elastic IP.

Associate-Elastic-IP-address
Associate-Elastic-IP-address

Now go back to the EC2 instance list and select your running instance now you will be able to see your "Elastic IP addresses" in the details section.

EC2-Management-Console
EC2-Management-Console

also, Public IPv4 and Public DNS also will be changed, so now if you restart your instance your IP will not be changed.

You can check with this IP as everything in the browser works properly by typing this IP in the URL.

Connect Domain using Route53:

Go to the services section and select Route53:

Route-53
Route-53

Click on 'Create Hosted Zone'

Route53-Dashboard
Route53-Dashboard

Now add your domain name and select Public Hosted Zone, then click on Create hosted Zone.

Create-Hosted-Zone
Create-Hosted-Zone

After creating the hosted zone, it will generate some records as below:

Now Click on Create Record Set and add record as below:

Create-A-record
Create-A-record

use your domain name and Elastic IP in relative columns and then It will create record A.

Now add another record, as below:

Create-Alias-Record
Create-Alias-Record

Select NS type record from records list and copy all values, as we need this to create a nameserver in Godaddy.

Connect with Godaddy:

Create a GoDaddy account if you don't have one or log in if you already have and from the dashboard select the MyProducts option, then click on the DNS button:

Now choose 'I'll use my own nameservers' and add your nameserver which you copied from AWS and paste it one by one per line and save it.

👉Note:

When making the entry, you are not needed to provide the final dot of each Nameserver record.

Awesome!!! That's All, Your EC2 container or the service offered by the IP should soon be available using the domain you entered.

Subscribe to our Newsletter

Stay up to date! Get all the latest posts delivered straight to your inbox.

If You Appreciate What We Do Here On TutsCoder, You Should Consider:

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Leave a Comment