Question

Correct setup for multiple domains pointing at one droplet

I have several domains pointing at one droplet for our company website. Currently which ever the domains you type in the site loads always showing the same domain, ie .com and .design domain loads .org in the browser.

I need to change which domain is shown as the default address, i want the .com address to be the address shown in the browser so if you type the other ones you are shown the .com.

My site is setup as a wordpress site and I tried changing the Website Site Url within wordpress but this didn’t stop the redirects happening (I dont have any redirects or forwards setup). ie site would still redirect to the .org address but now the css and images wouldn’t load as the links to the files had been changed to .com. As far as I know the only setup that I have done is point the 3 domains to the same droplet.

Was this the right approach but i need to allow more time for the changes and servers etc to reflect this or is there another way to achieve my goal.


Submit an answer

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!

Sign In or Sign Up to Answer

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.

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.

Hi there @iamleeadamson,

In order to get this working, you need to configure your web server as well.

If you are using Apache, you need to follow this guide here on How To Set Up Apache Virtual Hosts on Ubuntu 16.04 and host multiple websites on one server:

https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04

Or if you are using Nginx, you need to follow this guide here:

https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04

Hope that this helps! Regards, Bobby