Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Instead of assigning an Elastic IP to an EC2 instance, can I just CNAME a URL to the instance's public DNS name?

share|improve this question
up vote 7 down vote accepted

Yes, you can do that however the instances public DNS name will change any time an instance is started up. The best options are to either use the elastic IP (EIP) or work behind an elastic load balancer (ELB). Both options would be better to point a DNS entry to and would be able to remain the same on instance restarts. You would use a CNAME entry for ELB and you could use either an A or CNAME record for the EIP option. The advantage of the ELB option is that you could have multiple EC2 instances behind it giving you greater fault tolerance.

share|improve this answer

You can; but you really should get a elastic IP and map an A record to that, it is a much better solution. It'll be more reliable and result in faster DNS for clients(less lookups)

share|improve this answer

Yes. Just remember when you're setting up a cname to an external domain, you need to suffix it with a .

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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