I am pretty sure I know the answer, but I can only load balance a single domain name on a DO loadbalancer?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Multiple domains could potentially be pointed at one load balancer instance. Though there is only one IP address per load balancer. That means that the Droplets behind the load balancer will each need to be able to understand how to respond based on the domain being requested.
A simple example of this would be two static sites being served by Nginx. Each Droplet behind the load balancer would need to serve both sites and Nginx would need to use named server blocks to know which site to serve for which request. A minimal example of what that would look like:
Then you would need to create A records for both
blog.example.compointing to the IP address of the load balancer. The load balancer passes the host request straight through to the Droplets, allowing them to decide how to respond.
Digital Ocean load balancer is very basic. It can only do one domain SSL using Let’s Encrypt. Just trying to add MORE ssl certs for one load balance suing multiple domains is impossible. For $10 that a bit expensive.
Your only option is to make the load balancer yourself using Nginx and Certbot. The Certbot will use Let’s Encrypt to automatically renew the certs.
As for the web back end you will need to learn Nginx with multiple virtual hosts using port 80.
Digital Ocean has a very nice article on how to create your own Nginx with SSL cert using Let’s Encrypt here: https://www.digitalocean.com/community/tutorials/how-to-set-up-let-s-encrypt-with-nginx-server-blocks-on-ubuntu-16-04
In AWS one load balancer (ALB) cost $15 can handle up to 50 domains (hard limit) and each domain can have its own SSL certificate from Cert manager which auto renews cert using AWS cert authority instead of Let’s Encrypt which is not trusted in many high level companies such as Shopify (web hooks). So depends on your needs you have 3 options.
Want to learn more? Join the DigitalOcean Community!
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Sign up now
Thank you very much for your detailed response. very happy to be wrong in this case. I was quite sure it was "yes, 1 lb for each domain)… thanks again, i am now sure i want to go with DO load balancer.