Report this

What is the reason for this report?

Deploying multiple domains to 1 droplet

Posted on December 4, 2014

I have two domains and their name servers pointing back to my droplet. However when I type in either domain name into my browser they both go to the first domain that I setup. How can I fix this so they each go to their correct domain?

Quick reply is much appreciated!



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.

If you are using Apache you will need to set up VirtualHost entries for each domain you want directed to it’s own site. This tutorial will walk you through the process.

If you are using nginx you would set up server blocks which function in much the same way as Apache VirtualHosts. This tutorial will assist you with setting up nginx server blocks.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.