Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple domain names attached to same load balancer as alias records?

I have hosted multiple domain names (example.com and example.net ) on same instance in my auto scaling group. Now I have attached this auto scaling group to a load balancer. Using Route 53 can I point two zone apex (such as example.com and example.net) to same load balancer as alias records?

like image 368
Zeni Avatar asked Dec 17 '14 09:12

Zeni


1 Answers

Yes, you can.

However, you need to keep the following considerations in mind, depending on what your application requires:

  • ELB forwards the Host: header to the instance; it doesn't interpret it, so your web servers are responsible for reacting to the Host: header in the incoming request, and handling each site appropriately.

  • ELB will load balance all the requests among all of the instances, regardless of which domain they are for, since it doesn't know (or care).

  • ELB can only serve up a single SSL certificate. If you are using SSL, you have to have exactly one cert that's valid for all of the domain names, or, you have to run the ELB listener in transparent (TCP, not HTTPS) mode and handle the SSL certs with SNI on the instances, themselves. If you can't meet this constraint, you need one ELB per SSL cert, so the original question is moot -- each ELB has its own target for use with aliases.

like image 169
Michael - sqlbot Avatar answered Oct 30 '22 13:10

Michael - sqlbot