Question

Deploying multiple domains to 1 droplet

  • Posted 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!

Subscribe
Share

Hi skyler. are you using Apache or Nginx?

if Apache, you should set up virtualhosts …not too difficult.

Do you have access to sftp and a way to edit files on your server?


Submit an 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.