Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Point Domain to Amazon Web Services (AWS) EC2 Instance

Point Domain to Amazon Web Services (AWS) EC2 Instance

  1. Open the Amazon Route 53 console at https://console.aws.amazon.com/route53/.
  2. If you are new to Amazon Route 53, you see a welcome page; choose Get Started Now for DNS Management. Otherwise, choose Hosted Zones in the navigation pane.
  3. Choose Create Hosted Zone.
  4. For Domain Name, type your domain name.
  5. Choose Create.
  6. Click the Hosted Zone, edit record set.
  7. In the value, add ec2-54-152-134-146.compute-1.amazonaws.com.
  8. Change your DNS file to point to the IPv4 address (This would be in something like GoDaddy).
@liujchen

This comment has been minimized.

Copy link

liujchen commented Jun 9, 2018

seem like without using Amazon Route 53, you can use http://my.freenom.com/ to

  1. Obtain a free Domain Name
  2. Mapping Domain Name with Public IP/Elastic IP for EC2 Instance
@warungcloud

This comment has been minimized.

Copy link

warungcloud commented Jun 22, 2018

Hi @liujchen.

If we try to use IPv4 Public IP without using Public IP/Elastic IP for our EC2 instance, is it working ?

@ianemv

This comment has been minimized.

Copy link

ianemv commented Nov 11, 2018

Agree with liujchen.. tried the same. I thought of using Route 53 but opted to do it when I was able to use A record instead.

@mayurwadhe

This comment has been minimized.

Copy link

mayurwadhe commented Nov 28, 2018

Nice, thanks for the support. It works

@pnandhini11

This comment has been minimized.

Copy link

pnandhini11 commented Dec 11, 2018

I am getting timeout error when tried to reach my domain ( created using freenom) from AWS. Anyone got into similar situation? Anything i missed out in my settings? I followed these steps for free domain setup : https://medium.com/@kcabading/getting-a-free-domain-for-your-ec2-instance-3ac2955b0a2f

Any help?

@bensonkb

This comment has been minimized.

Copy link

bensonkb commented Dec 17, 2018

Nice Thanks for the Work.

@boraozkan

This comment has been minimized.

Copy link

boraozkan commented Mar 15, 2019

thank for help

@Narayan-Zade

This comment has been minimized.

Copy link

Narayan-Zade commented Apr 15, 2019

Thanks

@TareqNaushad

This comment has been minimized.

Copy link

TareqNaushad commented Apr 24, 2019

Thanks. It worked for me. However I am using a PHP Code Igniter application in AWS EC2 so proper URL address is something like www.mydomain.com/abcdefgh . When i put /abcdefgh it is not taking . What to do so that when in browser i write www,mydomain.com it should actually execute www.mydomain.com/abcdefgh ?

@MxBlu

This comment has been minimized.

Copy link

MxBlu commented May 5, 2019

@TareqNaushad Have a look at setting up nginx on your EC2 instance, you can do so such that any requests to www.mydomain.com heads to www.mydomain.com/abcdefgh instead.

@ndnaren2k

This comment has been minimized.

Copy link

ndnaren2k commented Jun 12, 2019

@TareqNaushad try using htaccess for it, it will help you with the url masking & execute your script using domain name itself instead of full directory url.

@TheAshwanik

This comment has been minimized.

Copy link

TheAshwanik commented Dec 25, 2019

Thanks. It worked for me. However I am using a PHP Code Igniter application in AWS EC2 so proper URL address is something like www.mydomain.com/abcdefgh . When i put /abcdefgh it is not taking . What to do so that when in browser i write www,mydomain.com it should actually execute www.mydomain.com/abcdefgh ?

You need to redirect the traffic to sub directory obviously. You can use Nginx, haproxy etc..

@sharkdeng

This comment has been minimized.

Copy link

sharkdeng commented May 25, 2020

Hi, I tried your method, but it doesn't work. My website edu3d.co still not working. Any suggestions? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.