0

I am new to amazon ec2 however I managed to run EC2 instance and connect elastic ip to that. Now I bought a new domain name, I thought i need to use amazon route 53 service to point my domain name to the ip.

I did so and changed A record. Now when I try to open url "i-loveit.info" it opens with www.i-loveit.info but if I open url http://i-loveit.info ... then i get page not found error. Anybody know where I am making mistake and how can I solve. All I want is to point my domain name to amazon EC2 ip permanently.

5
  • A quick 'dig' of your domain, suggests that there is an A record setup for the www subdomain, but that there is no A record for the top level domain. You probably want the A record pointing your top level domain at your elastic IP, and a CNAME pointing your www subdomain at your top level domain.
    – cyberx86
    Feb 12, 2012 at 6:45
  • Hi Cyberx, Thanks for this suggestion. I am bit confused where I need to add A record from my domain? On my DNS management of domain provider or Amazon route 53 console. If I have to add to amazon , then where I can find option to add record for top level domain?
    – Sandy Fark
    Feb 12, 2012 at 7:23
  • It looks like you have it figured out - at the moment, your TLD is loading, but not your www subdomain. (Just to answer your question though, A records (and CNAMEs, etc) need to be added on your DNS server (in this case, Route53) - if you are using the AWS console, there should be an option to create a record set - select an A record (ipv4) and you should be able to leave the 'name' as the default (just your domain name, without a subdomain).
    – cyberx86
    Feb 12, 2012 at 7:54
  • Yes cyberx, Its working now... Thanks for your suggestion. It helped me a lot. Thanks again :)
    – Sandy Fark
    Feb 12, 2012 at 8:03
  • You still do not appear to have any records for your www subdomain (perhaps it simply hasn't propagated yet - although, I did use an EC2 instance to dig). I'll post the comments above as an answer, so you can close out the question.
    – cyberx86
    Feb 12, 2012 at 8:08

2 Answers 2

5

Firstly, you do not need to use Route53 as your DNS provider - any DNS provider will do - you can even host you own DNS servers (although, good practise is to have at least 2 redundant servers hosting DNS).

Your registrar needs to be made aware of the name servers you are using (which you appear to have done). On these name servers, you need to point the domain in question to your elastic IP address.

For your domain name, you will use an A record to point it to your elastic IP For any subdomains, you will likely use CNAMEs to point to your domain name (although, in some cases, A records may be appropriate).

DNS records (A records, CNAMEs, etc) need to be added on your DNS server (in this case, Route53) - if you are using the AWS console, there should be an option to create a record set - select an A record (ipv4) and you should be able to leave the 'name' as the default (just your domain name, without a subdomain).

A quick dig of your domain, suggests that there is an A record setup for the www subdomain, but that there is no A record for the top level domain. So, when a lookup is performed for the www subdomain, the nameservers return the correct IP address, and you can connect to the EC2 instance. When you lookup your main domain though, no IP address is returned, and no connection is established to the EC2 instance.

Update: It looks like you have it figured out - at the moment, your domain is loading (second level domain), but not your www subdomain, and a dig shows that you now have an A record for your domain, but none for your subdomain.

7
  • Hi cyberx, thanks for this...I am really new to server side things. Let me tell my goal in simple, I want a hosting on EC2 where I can run php code, my domain name can open what I upload at EC2 instance and I can set php mail to mail functionality. Now what I achived: I set up instance, have domain name, installed LAMP using putty, I can manage my Domain using DNS management.. I tried to change A record from Domain managemet and waited 24 hrs but was not able to open site. So i went to route 53 even I need to pay for route 53. You understand my question so you can help me easily. Thanks
    – Sandy Fark
    Feb 12, 2012 at 9:40
  • In addition, I installed mail, postfix and able to send mail using mail but sender email looks like this: [email protected]
    – Sandy Fark
    Feb 12, 2012 at 9:47
  • A few suggestions - I noticed you are running Apache with a CGI version of PHP, you may want to consider PHP-FPM (a popular FastCGI process manager for PHP), and if your code does not require .htaccess files, may wish to use nginx (especially with the smaller instances - t1.micro, or even m1.small). You definitely do not need Route53 - any DNS provider should work (I use EC2 servers, but not Route53). The email issue is likely a) because the default Apache user is 'www-data', and b) you haven't set a hostname. You can always ask another question if you have difficulty with the email setup.
    – cyberx86
    Feb 12, 2012 at 10:05
  • My code will be based on codeignitor framework so I need .htaccess. If you can help me by telling what I do next it will be grateful. I just now changed another domain record. here is screenshot i-loveit.info/dns.png . I registered domain from domain.com, with domain management tool i put these records. Name server for domain are NS1.NAMERESOLVE.COM,NS2.NAMERESOLVE.COM which is default name server of domain.com. Am I right here should i wait 24 hrs to see result?
    – Sandy Fark
    Feb 12, 2012 at 10:16
  • my skype is adhaata if u consider.
    – Sandy Fark
    Feb 12, 2012 at 10:18
0

use amazon's own AWS ROUTE53 (nameserving application). it is simple and free and will have you up and running in no time. follow this stackoverflow tutorial 5 easy steps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .