Using Digital Ocean DNS on a multiple domain droplet (cPanel)

July 3, 2013 8.1k views
I'm looking for some help on understanding how to use Digital Ocean's DNS for a droplet that has multiple domains (set-up through cPanel). Does anyone have experience in dealing with this? Am I better off with using DO's DNS or cPanel's DNS? It doesn't matter to me, just so I can get it working. I was going to set up my own DNS, but that doesn't seem entirely easy being we are restricted to one IP address per droplet. And I'm not entirely savvy with DNS technicalities, so I'm looking to learn so hopefully you guys can shed a light on my problem. Anyways, for example let's say this is my info: IP address: Hostname: blue Domain (directory): ( ( ( How would I go about using DO's DNS services to use the and at my domain registrar so that the domains would correctly point to their respective directories on the droplet?
9 Answers
In your web server on your droplet, e.g. Nginx, Apache2, etc., create a virtual host for each domain.
Correct me if I'm wrong, but doesn't cPanel already do this for me when I go to Create a New Account from WHM? Or am I misunderstanding something? I have the accounts created on the VPS, I'm just wondering how to get DNS working on the droplet so domains point to their respective address.
To further address my current situation, I have attempted to set up the DNS through WHM on the droplet and Namecheap (domain registrar). I registered the nameserver info at Namecheap to the following: => =>

and then set the nameserver for the domain to:

The mitigation period was short, but that may be because I have Google DNS on my laptop. But when I visited, I was directed to the root folder of, not to the account I had set up specifically for that domain through cPanel, which should have been

So it seems like everything I did at Namecheap worked, as it is what I have done previously on my dedicated server and have the accounts directing to their respective directories appropriately. Just looking to see how it is done at DigitalOcean on the droplets.

In the meantime, I am re-imaging the droplet and re-installing cPanel to retry the initial configurations when going through the wizard on WHM to see if it helps any.
How did the cPanel re-install go?

Just out of curiosity, why are you using cPanel? Are you going to be selling hosting services? I ask as a recent newbie to Linux and VPSs; I had actually posted a similar ?, in a different thread.

If you wouldn't mind contributing, I'm sure plenty of other people would also appreciate your point-of-view: The Definitive Thread on Open Source Control Panels/ cPanel Alternatives: Part I
No real success with re-installing cPanel.

I set the nameserver for at Namecheap to:

And when I direct my browser to it take me to the root directory of the server IP, Not to the directory I have set up for that domain in cPaenl, which should be

I chose cPanel simply because I am somewhat familiar with it (was the basic CP I've used for years, and I don't mind paying a couple dollars per month for it), as it is installed on my dedicated server so I like being a little consistant should I need to use it as a dev server too. I'm not a server administrator by any means, just trying to learn the basics to get what I need completed,as I focus more on web programming.

I don't really have any desire to sell hosting, except set up some companies I've created websites for on it. But at this pace, I might have to jump off DO and set up a VPS at another host who I can get multiple IPs at, so I feel more comfortable at setting up a private DNS on.
I went to look at the Virtual Host file, and everything appeared to be there properly. So from what I can tell, cPanel creates the Virtual Host for you. So I'm not sure why the server doesn't route to the correct folder.
Case closed. Once I uploaded a file via FTP, the server appears to route the request to the correct folders for the account on the server. Which must be a quirk or something, because it was throwing me for a loop prior by not doing so when nothing was uploaded.

But everything seems to be working once a file is uploaded and the domain is requested. For anyone who may be wanting to know in the future. Thanks for your help Pablo!
How to Add my Domain from Namecheap on DigitalOcean VPS ?

When i update nameservers , , i got error . Please help in this ..
@mrmanivasagam: What error do you get when you update your nameservers to and
Have another answer? Share your knowledge.