How to map domain name to Amazon EC2 instance ( Using Route 53 )

Get Elastic IP and Assign it to Amazon instance

The first thing you need to do is get an Elastic IP address, EC2 Instance IP address can change during reboot the instance but elastic IP are static IP’s so you should make sure you create one of them and assign it your running instance. After getting Elastic IP follow these steps to map domain :

Go to Amazon AWS Console -> Services and select ‘Route 53’.

Click on Hosted Zones and Get started now.

Click on Create Hosted Zone button.

Give the domain name you want to map, make sure that you don’t add www. to it. Type any comment if you like, Select type as Public Hosted Zone.

You will see something like below on your screen, List of NS servers, usually there are 4 different entries. Make note of these as you need them in the last step ( In the domain account settings ).

Now Create a Record Set and add values as shown in image below :

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

Now we need to add sub-domain too, so should also work.

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

Add the Amazon NameSpaceServers in Control panel of Domain Provider

Now go to domain console and under my domains, find your domain and click on Manage DNS under Settings. ( I am using GoDaddy for this )

Change the Name servers type from default to custom ( you should see list of 2 servers name after selecting custom ) :

Add all the 4 NS servers you got in above steps ( while creating Hosted Zone ), add them one by one. Save it and wait for a couple of minutes. Type your domain name in the browser and you should be redirected to your website.

Please follow and like us:


Software Engineer

Leave a Reply

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