I register the domain through GoDaddy. And now i have a AWS EC2 server behind a ELB.

I read the document from AWS about setting up the CNAME. which I did.

www    CNAME     elb.aws.address

while my A Record is pointing to my EC2's EIP ip address.

@      A

When I load the URL, it hits the domain directly, but not the ELB. Should I remove the A Record, and just leave the CNAME pointing to elb address?


That's up to you. Either way, the naked domain won't go to the ELB -- you can't use naked domains with ELBs unless you use Amazon's Route 53 service for your DNS and set up an alias. Because you can't set up a CNAME for a naked domain. Normal practice would be to have your server do a 301 redirect for example.com to www.example.com, and accept the lack of resilience in calls to example.com.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.