Skip to content

Instantly share code, notes, and snippets.

@keithweaver
Created March 20, 2017 23:49
Show Gist options
  • Save keithweaver/7f7de8a2499b3bcfafd7d753a9e3f699 to your computer and use it in GitHub Desktop.
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).
@benzntech
Copy link

Nice Thanks for the Work.

@boraozkan
Copy link

thank for help

@Narayan-Zade
Copy link

Thanks

@TareqNaushad
Copy link

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
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
Copy link

@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

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

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

@dewanshDT
Copy link

yay 🙌

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