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!
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.