Question

one droplet multiple domains

I have a couple of domains (say a.com and b.com) and would like to host them on DO with one droplet. I initially set up a.com using my droplet (which happened to be called a.com as well). Everything went fine and I was able to set up mail etc. Brilliant!

The problem arises now that I’d like to move b.com to DO (and initially host it on the same droplet). As with a.com I changed the names servers (on my registrar) for b.com the DO’s name servers. All good so far - but when setting up the DNS entries the trouble started:

In DO’s DNS web tool I created initially another A record for b.com. pointing at the same IP - but the DO DNS complains the the domain name (b.com) is not a subdomain of the initial domain (a.com) - I guess fair enough. So I create a C record *.b.com. -> a.com. - with the same result.

And this is where I became somewhat stuck. Any ideas, hints, etc please.
Thanks in advance for your time.

Show comments

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.

Thanks for your replies - they were very helpful. In particular CrypticDesigns comment made me look at the DNS panel again. I got it sorted - and everything kind of makes sense once one reads the headings properly - Duh ;-). Anyway, for anybody who will run into the same ‘use case’, here is what one needs to do: When I first set up a.com I used the ‘Add a Domain’ section: *a.com / the ip of your droplet (of droplet a.com) / your a.com droplet * Now for the b.com domain do exactly the same. *b.com / the ip of your droplet (of droplet a.com) / your a.com droplet *

This will result in now having 2 entries the Domain section a.com b.com

Then add A/C/MX etc records for b.com according to needs.

Bingo!

You’ll likely be better off using Cloudflare for your DNS settings as it’s a service that even DO recommend using. I have 15 websites installed on a single $5 droplet each with their own WP directory install without any issues and all, of course, pointing to the same droplet, each with their own A records, CNAME records, MX Records, SPF and DKIM yada yada yada, so it can definitely be done. If you have only just changed/added the DNS records for siteB, it might just be a case of waiting for the DNS setting to propagate.