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

I have a couple of sites that I want to move to Amazon EC2. All the sites uses ssl so it needs to have a dedicated ip address to each one. My question is: Even if I host all the sites in the same instance, do I need to get one elastic ip for each site?

share|improve this question
While a dedicated IP for each SSL identity is preferred for compatibility - you cannot associated multiple elastic IP addressed with a single EC2 instance, so would need multiple instances as well for your scenario. (With VPC you can add 2 elastic network interfaces, and associate an elastic IP with each, but that still only allows a small number of IP addresses to be associated with a instance) – cyberx86 Jun 3 '12 at 16:09
up vote 1 down vote accepted

While there are some solutions that allow multiple SSL identity certificates on a single IP address, in general if you require good browser compatibility, then you will require an IP per Certificate. There are some details on why this is the case in this question

The problem for standard Name-based Virtual Hosts is basically that the first thing that the https server does during the TLS/SSL handshake is send the SSL certificate with a "common name" identifying itself as - However Name virtualhosts relies on a "Hosts:" header to decide which site which is sent later during the HTTP phase.

Hence (using traditional... SSL v1, old browsers etc, Windows XP) there can only be 1 SSL identity per IP address, because the first thing the servername is already known as, which it cannot change afterwards...

Notes -generally these are for fairly niche situations, such as intranet or * wildcard certs.

Server Name Indication, is a solution for hosting multiple SSL certs on a single IP, but it has poor support:

  • not XP or old safari, or old android - works with only 1 IP -"

  • Wildcard certs, not suitable in this particular situation because the servers names are domain level, eg and, rather than and

share|improve this answer
SAN certificates are more widely supported than SNI and are a good solution if you only have a few domains. Most of them support up to 25. – Ladadadada Jun 4 '12 at 0:52

You can't associate multiple Elastic IP addressees with a single normal EC2 instance.

You can have multiple ELB's in front of a single instance with each one getting its own IP address and proxying to a different port on the instance.

share|improve this answer
Plus, you can do SSL termination at the ELB level, which simplifies SSL certificate management. That way, you wouldn't even need to proxy to different ports on the actual instance - a single port will do, receiving regular HTTP traffic. – Nikhil Dabas Jun 4 '12 at 20:12

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.