Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to link godaddy domain with AWS Elastic Beanstalk environment?

I'm running into this problem trying to link my Godaddy domain with an AWS Elastic Beanstalk instance. I found a lot of documentation on how to link an EC2 instance with a domain on Godaddy but not for Elastic Beanstalk instance. So I ended up with this URL: www.MY_SITE.elasticbeanstalk.com

Here is what I did for an EC2 instance:

  1. I updated the Nameservers on my Godaddy domain with the ones from my Route 53 Hosted Zone.
  2. I created a new Elastic IP on the EC2 console.
  3. I went back to Godaddy and updated the DNS A @ field from their DNS Manager, with the EC2 Elastic IP one.
  4. You normally have to wait 1h to 48h and it should work.

How can I do the same for a AWS Elastic Beanstalk instance, not an EC2 one? I can't see the instance I created from my EC2 console in order to link it to an Elastic IP.

Hope this is clear enough.. Any help?

like image 213
Bob Bill Avatar asked Jul 22 '12 17:07

Bob Bill


People also ask

Can I use GoDaddy with AWS?

You can use any AWS public gateway provider such as EC2, ELB, S3 to serve your website or server to the public domain you have on GoDaddy. The AWS usually charges about . 51 USD per month to maintain this zone entry as well.


Video Answer


2 Answers

No need to create a CNAME or do any forwarding - this is bad from the point of SEO and not recommended by Amazon. Even you should not point a record to IP directly - it will cause a lot of troubles in the future because IP can be changed any moment.

The most elegant way is to migrate DNS service from GoDaddy to Route 53. You still will be with GoDaddy, but handling requests for your site will be on Amazon's side.

Here is what you need to do:

  1. Create a new Hosted Zone for your site in Route 53 console: enter image description here

  2. Open newly added domain name, find NS record and copy servers: enter image description here

  3. In GoDaddy's Domain Manager export records via "Export Zone File (Windows)".

  4. Import those records to Route 53 ("Import Zone File" button).

  5. In GoDaddy's Domain Manager set custom DNS nameservers, obtained on the 2nd step: enter image description here

Migrating might take some time (even days). Now you can link you domain with your Elastic Beanstalk site. To do so select/create proper A record type in Route 53 and set Alias for it: enter image description here

Hope it helps.

like image 161
Vsevolod Krasnov Avatar answered Sep 19 '22 00:09

Vsevolod Krasnov


Here's what I did when I was facing the problem of linking a GoDaddy domain with AWS ElasticBeanstalk.

DNS Manager:

  • A record @: 64.202.189.170 (that is GoDaddy's forwarding IP btw)
  • Cname www: AWS EB domain (e.g. awseb-xyz.us-east-1.elb.amazonaws.com)

Forwarding:

  • Forward Domain to www.example.com (forward only, without masking)
  • Forward Subdomain to AWS EB domain (e.g. awseb-xyz.us-east-1.elb.amazonaws.com) (with masking)

In order to access the site without www (e.g. http://example.com), I had to set up the forwarding of the domain to the www cname. This www cname then gets forwarded to the AWS EB domain (with masking in order to keep www.example.com in the address bar).

like image 35
sitiveni Avatar answered Sep 20 '22 00:09

sitiveni