Last updated May 13, 2021

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.

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

Image

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

Elastic-IP-addresses

Click on Allocate button

Image

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,

Image

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

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

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

Click on 'Create Hosted Zone'

Route53-Dashboard

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

Create-Hosted-Zone

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

Image

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

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

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

Image

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:

Image

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.

ImageError:  The Parser function of type "raw" is not defined. Define your custom parser functions as: https://github.com/pavittarx/editorjs-html#extend-for-custom-blocks 

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

Tags

Available for projectsLet’s build together

Need this built properly,
not just explained?

I take on Angular and NestJS work directly — auth systems, multi-tenant SaaS, API rewrites and the deploy pipeline underneath them. You talk to the person writing the code.

Projects delivered
20+ Projects delivered
Angular • NestJS
7+ years Angular • NestJS
Average reply time
1 day Average reply time

What I can help with

  • Auth and permissions systems
  • Multi-tenant SaaS foundations
  • API design and rewrites
  • Deploy pipelines and VPS setup
  • Bug fixing and performance optimization
Send me a message

Tell me about your project and I’ll get back with a realistic scope and price.

Turn
Your Ideas
Into Reality

Stay in the loop

Get the finished tutorials, projects and resources in your inbox.

Join 5,000+ developers and get new tutorials, source code, product updates and exclusive content — straight to your inbox.

  • No spam
  • Useful content only
  • Unsubscribe anytime

Subscribe to TutsCoder

Be the first to get new tutorials, projects and tips.

Join 5,000+ developers already learning with us.

Learn
Build
Grow

Discussion

0 comments

Share your thoughts, ask questions or suggest improvements. Let’s learn and grow together!

No comments yet — be the first to start the discussion.

Join the discussion

Sign in to join the discussion. Your account also keeps your saved tutorials and path progress.