Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

I am a bit confused on how I can use Amazon AWS to host multiple websites. I under stand how to host a website on there however I am only allowed up to 5 elastic ip addresses. So how would I host more than 5 domains if I cannot assign an ip address to each domain? I could use the Amazon Public DNS address provided which is something like ( however I cannot use this as a A record when it comes to changing the domain's DNS.


share|improve this question
up vote 5 down vote accepted

You only need one elastic IP address. The rest can be achieved using name based virtual hosting.

  • Create an A record that points to your elastic IP address for your main host.
  • Create a CNAME record for each of the additional domains that you want that points to you main domain name A record.
  • Create a virtual host for each domain.
share|improve this answer
So that means I have to put all the web files on one instance? Won't that mean that each domain will share the same resources? - slowing down the server? – John Aug 15 '11 at 17:42
@John: Depending on what your domains are doing, many domains can be hosted on a single instance. When you need to scale above one instance then you should assess what needs to be scaled and take appropriate action. – Iain Aug 15 '11 at 17:47
@Iain, Can you elaborate on step 2? Would that be in GoDaddy for example? What would be example values for host and points to? Also, what should be the value of the A record on the second domain? – mgPePe Jul 30 '14 at 8:54

For web sites, the only time you absolutely need multiple IP's is when you're doing SSL (HTTPS) for multiple sites.

share|improve this answer
  1. Point all your sites to a single IP address.
  2. Using your web server, create virtual hosts. This means the web server resolve your site based on the name of the site.

What web server are you running?

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.