9

I have an Elastic IP address that points to an instance of my EC2. How can I configure my domain name (hosted at GoDaddy) to point there?

Shamoon
  • 911
  • 4
  • 14
  • 22
  • 1
    This is a question for serverfault.com. The basic idea is that you set up a CNAME or A record in DNS to point to your amazon instance. – Dean Harding Jun 24 '10 at 01:19

2 Answers2

9

If you're setting up a subdomain (e.g. www.example.com instead of example.com), I'd recommend using a CNAME to the long form, public hostname associated with the Elastic IP address (e.g. if your IP is 1.2.3.4, the hostname is usually something like ec2-1-2-3-4.compute-1.amazonaws.com.).

Amazon has custom-configured servers within their cloud that cause the long form hostname to resolve to the internal, instead of external, IP address. Traffic between instances that connect to each other using their internal IP addresses don't pay bandwidth charges, while if one EC2 machine connects to the public IP address (e.g. 1.2.3.4, continuing the example above), it would pay for bandwidth.

Unfortunately, if you're configuring the root of your domain (e.g. example.com), it's not possible to use a CNAME because of restrictions in DNS.

Evan Broder
  • 821
  • 5
  • 5
3

Login to your GoDaddy account; in the control panel you'll be able to manage your DNS records. You're going to want to change yourdomain.com's A record to your Elastic IP. This may take 24 hours to propagate depending on your TTL.

gravyface
  • 13,957
  • 19
  • 68
  • 100