getting my domain name to point to my amazon ec2 instance

Make sure the A-record of your DNS is pointing to the public-facing IP address of your server.

Generally you'll get three columns:

  • Host Name <- How users will get to your site (@, www, subdomain, etc)
  • Address <- where the record should point (generally the IP address of the server)
  • Record Type <- Typically this will be an A record

Using the @ symbol for your hostname will allow users to get to your site via http://domain.com. If you want http://www.domain.com, you will have to set up another record with www as the Host Name.

To check propagation, as well as making sure the record points to the proper address, you can use tools such as http://www.whatsmydns.net/


First configure an IP address for your DNS settings

  1. In AWS select Elastic IP’s in the left hand menu.
  2. In the top menu under “Addresses”, click “Allocate New Address”.
  3. Ensure “EIP used in” is set to “EC2″ and click “Yes, Allocate”.
  4. Click the tick box next to the new IP address that has appeared in the main left pane and press the “Associate Address” button in the top menu.
  5. In the “Instance” drop down, select your webserver that we set up previously and click “Yes, Associate”.

That’s it for management on the AWS side of things, however, please note that now when you access your webserver through SSH, SFTP or MySQL, your public DNS address that you were using for the connection will have changed. At this point it is probably better to just use the new IP address to connect that you have just associated with your webserver.

Setting up your DNS

  1. Login to your godaddy account and go to domain manager.
  2. Click launch infront of your domain.
  3. click on tab of DNS Zone File and click on Edit.
  4. chage the IP to the new one (you created by Elastic IP system) infront of @ in host section and save changes.