Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am at the point in playing around with EC2 that I have launched a webserver. Right now, the website URL looks like http://ec2-<some numbers>.compute-1.amazonaws.com/

I am evaluating the usefulness of these services for my small business purposes; is there a way I can get my URL to look something more like http://<mybusiness>.com. Ideally, I would like to get it to look cleaner, and furthermore I would rather not have "amazonaws" as part of it. Is this possible?

I'm a newb to AWS, so apologies if this is an easy question

share|improve this question
    
Just use something like freedns and setup some domain with ip number to your machine. You need elastic IP for this. –  Andrew Smith Jun 29 '12 at 22:05

2 Answers 2

This actually has very little to do with AWS, so you can apply this more generally where you next have hosting.

To solve this, you to setup DNS. At this point, you just add the corresponding entries:

mybusiness.com.  IN A 1.2.3.4
www.mybusiness.com. IN CNAME mybusiness.com

so that (www.)mybusiness.com will work as expected. 1.2.3.4 is the (elastic) IP that Amazon gives you (i.e. the one that ec2-<some numbers>.compute-1.amazonaws.com resolves to).

share|improve this answer
    
to be clear, the DNS will be controlled by your name registrar (like GoDaddy) and you should be able to control where it points from there. Here is the first link I could find describing how: brangle.com/wordpress/2010/11/… –  jhayes Jun 29 '12 at 21:17

Your EC2 instance has a public IP address and DNS name. Using your normal domain provider, you can create either an A record pointing to the public IP address, or a CNAME record pointing to the DNS name.

However, if you stop and restart your instance (either intentionally or unintentionally), both your public IP address and DNS name will change. If this happens, you'll have to update your DNS entry for mybusiness.com. This may cause a problem because DNS entries may be cached. You'll have to wait (sometimes 48 hours) for the cache to refresh.

To avoid this problem, there are 2 possible solutions: (a) Use an Elastic IP address. If you do this, you can regain your public IP address and DNS name if your instance is stopped. (b) Use Route 53 to host your mybusiness.com DNS and update your records programmatically when your instance starts. For this to work, you'll need to use a short TTL (time-to-live) on your DNS entries.

share|improve this answer
1  
Elastic IPs are the appropriate solution here for a webserver that is normally running 24/7. –  Tom Marthenal Jun 29 '12 at 21:23

Your Answer

 
discard

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.