Skip to content

Instantly share code, notes, and snippets.

@keithweaver
Created March 20, 2017 23:49
Show Gist options
  • Select an option

  • Save keithweaver/7f7de8a2499b3bcfafd7d753a9e3f699 to your computer and use it in GitHub Desktop.

Select an option

Save keithweaver/7f7de8a2499b3bcfafd7d753a9e3f699 to your computer and use it in GitHub Desktop.
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

liujchen commented Jun 9, 2018

Copy link
Copy Markdown

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

Copy link
Copy Markdown

Hi @liujchen.

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

@ianemv

ianemv commented Nov 11, 2018

Copy link
Copy Markdown

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

mayurwadhe commented Nov 28, 2018

Copy link
Copy Markdown

Nice, thanks for the support. It works

@pnandhini11

Copy link
Copy Markdown

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?

@benzntech

Copy link
Copy Markdown

Nice Thanks for the Work.

@boraozkan

Copy link
Copy Markdown

thank for help

@Narayan-Zade

Copy link
Copy Markdown

Thanks

@TareqNaushad

Copy link
Copy Markdown

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

MxBlu commented May 5, 2019

Copy link
Copy Markdown

@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

Copy link
Copy Markdown

@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

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

@dewanshDT

Copy link
Copy Markdown

yay ๐Ÿ™Œ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment