I mistakenly asked this question in stackoverlow however, it probably makes more sense here.
My application is on amazon and i am using their EC2 loadbalancer. Amazon states on their site:
DNS Name: XXXXXXXX.us-east-1.elb.amazonaws.com Note: Because the set of IP addresses associated with a LoadBalancer can change over time, you should never create an "A" record with any specific IP address. If you want to use a friendly DNS name for your LoadBalancer instead of the name generated by the Elastic Load Balancing service, you should create a CNAME record for the LoadBalancer DNS name. For more information about CNAME records, see the CNAME Record Wikipedia article.
I created a CNAME record host
www mapping to the loadbalancer above in the DNS.
http://www.mydomain.com forwards to the right appserver. (Cool)
However, I noticed that when I type
mydomain.com instead of
http://www.mydomain.com it goes to the default A record which is mapped to a different IP and not the loadbalancer. How do I fix this? I want both www.mydomain.com and mydomain.com to go to the same loadbalancer. I think I need to do this in the DNS, right?
Note: I verified the above by pinging both addresses.