Point Domain to AWS EC2 Instance

Today we will learn how to point domain to Amazon EC2 instance. We have two way to do that we will learn both of them. So let’s see how to point domain to EC2 instance

Get Elastic IP and Assign it to Amazon instance

The first thing you need to do is get an Elastic IP, the instance IP can change during reboot etc but elastic IP are static IP’s so you should make sure you create one of them and assign it your running instance.

Step 1 – Open the AWS Management Console, click the EC2 link, and display the page associated with your region.

Step 2 – Click the Elastic IPs link in the EC2 Dashboard.

Click Allocate New Address and choose Amazon’s pool of IPv4 Addresses from the list. Click Yes, Allocate to confirm your choice.

Select the newly created Elastic IP and choose Associate Elastic IP Address.

Choose your desired EC2 instance from the drop-down list of running instances and click Associate.

Method 1:

Step 1: Go to the EC2 instance and copy the IP address

Step 2: Goto Your Domain Provider

Next, Go to your domain provider and choose the domain you want to point. Now open DNS. Now add A record. Like below

Next, Click on Save button.

You can expect a propagation time up to 24 hours. This is because it takes time for the DNS to take effect across the internet. The actual time of propagation may vary in some locations based on your network setup.

Congrats! You have successfully point your domain.

Method 2

Create Hosted Zone and Record Sets

Now, Open the Route 53 console at https://console.aws.amazon.com/route53/.

Next, Select DNS management

After clicking on the DNS Management you will see a new screen where you will find another option called Create Hosted Zone click on Create Hosted Zone button

Next, Enter Domain name and hit Create button

You should see something like below on your screen, Name Space servers, usually there are 4 different entries.Make note of these as you need them in the last step.

Now Create a recordset and add values as shown in image below

  • Keep name field empty
  • Select Type A
  • Select Alias No
  • Value – This should be your elastic IP
  • Routeing Policy: Simple

Next, We need to bring subdomain too, so www.yourdomain.com should also work

  • In name field type www.
  • Select Type A
  • Select Alias No
  • Alias Target from dropdown select your site name
  • Routeing Policy: Simple

Add the Amazon NameServers in Control panel of Domain Provider

Now go to your domain provider and select the domain from list you want to point. In my case i am using GoDaddy

Click on the DNS will redirect you on DNS Management page here go to the Nameservers sections and click on Change button

Next, Copy your DNS from aws panel and put here

  • Choose I’will use my own nameservers
  • Enter all the 4 namespace servers you got from AWS
  • Click on Save button

You can expect a propagation time up to 24 hours. This is because it takes time for the DNS to take effect across the internet. The actual time of propagation may vary in some locations based on your network setup.

Congrats! You have successfully point your domain.

If you have any questions or thoughts to share, use the comment form below to reach us.

31 Comments

  1. Rajesh Chaudhary said:

    Thanks.

    July 5, 2020
    Reply
  2. How to: Direct a custom domain to an AWS instance – Learning to Code said:

    […] a static IP so that when my AWS server is rebooted, the domain is still pointing at the correct IP. https://w3path.com/point-domain-to-aws-ec2-instance/ gives a good example of how to set this up. Tl;dr: Set up an Elastic IP through AWS, which […]

    December 2, 2020
    Reply
  3. Lamar said:

    What’s up to all, it’s in fact a nice for me to visit this website, it
    contains priceless Information.

    Also visit my blog post … cheap flights

    January 31, 2021
    Reply
  4. Marcia said:

    I am regular reader, how are you everybody? This article posted
    at this web page is really pleasant.

    Here is my blog post – cheap flights

    January 31, 2021
    Reply
  5. Rowena said:

    Hi! Do you know if they make any plugins to help with SEO? I’m trying to get my blog to rank for some
    targeted keywords but I’m not seeing very good success.
    If you know of any please share. Many thanks!

    Here is my website; cheap flights

    February 1, 2021
    Reply
  6. Antonio said:

    Thanks for the good writeup. It in fact was a entertainment account it.

    Look complex to more introduced agreeable from you! However, how could we communicate?

    Feel free to visit my homepage cheap flights (tinyurl.com)

    February 2, 2021
    Reply
  7. Marlys said:

    Pretty nice post. I just stumbled upon your blog and
    wanted to say that I have truly enjoyed surfing
    around your blog posts. In any case I will be subscribing
    to your feed and I hope you write again very soon!

    Feel free to visit my website; cheap flights

    February 2, 2021
    Reply
  8. Adele said:

    Great site you have got here.. It’s difficult to find high-quality
    writing like yours these days. I really appreciate people like you!
    Take care!!

    Here is my homepage :: cheap flights (tinyurl.com)

    February 3, 2021
    Reply
  9. NncsGeste said:

    viagra super power viagra in usa cheap viagra in las vegas nv

    February 7, 2021
    Reply
  10. Lbsxguany said:

    skin care viagra canada online medicine order discount

    February 8, 2021
    Reply
  11. Terrence said:

    Hello colleagues, its enormous article regarding
    tutoringand entirely explained, keep it up all the time.

    Here is my webpage :: cheap flights (http://tinyurl.com/y3aeorj3)

    February 12, 2021
    Reply
  12. Jbbnguany said:

    peligro de usar cialis cialis ukash cialis daily or every other day

    February 13, 2021
    Reply
  13. Mai said:

    Transcendentalism On The Literature Network Teachers To Parents How To Register

    Also visit my web-site read online (exanlanro1977.netlify.app)

    February 17, 2021
    Reply
  14. WWW.XMC.PL said:

    I just added this web site to my favorites. I enjoy reading your posts. Thanks!

    February 26, 2021
    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *