Virtualmin on a VPS: How do multiple domains at different registrars work?

Suppose I have some domains at GoDaddy/Bluehost/Siteground/wherever.

I set up a Virtualmin on CentOS.

I know that I can point the domain at the VPS’s IP, but how does it work if you need to migrate to a site to a different box? Do you have to have the client log in and change their name servers to point at the new box? Is there a way for the VPS provider (Digital Ocean in my case) to handle this or is this a completely manual process?


Well, where is the DNS being hosted? Is it on the current web server? Or is the DNS hosted at the VPS provider?

If it’s at the VPS provider, then you could just update the IP addresses using the DNS tools at the VPS provider.

If your web server is also acting as a nameserver – then you would typically need to log into the registrar, and change the IP address associated with it.

Note that if all the domains being moved are using the same nameservers, then you’d just have to make the update once at your registrar for that one set of nameservers.


I guess I don’t understand how DNS hosting works, in general. As it is now, all of my sites are at the host under the same shared hosting account, so it hasn’t been a problem.

I guess what I don’t understand is, if I change the nameservers for a domain to NS.digitalocean.whatever how do I ensure that it resolves to my VPS?

What’s stopping somebody else from creating a DNS record with the same domain and pointing it at their webserver instead of mine? Is there some kind of verification process that ensures that I’m the own that owns it?


Yup, DNS has a lot of moving parts, and there’s a lot to learn about :slight_smile:

At your registrar, you set the nameservers for any given domain – those nameservers become the only place DNS lookups will occur for your domain.

There are instructions on setting up nameservers here:

To answer your question – anyone can add DNS records for your domains to their server. But those aren’t used for DNS lookups – anytime someone on the Internet wants to perform a DNS lookup on your domain, the nameservers at your registrar are what will be used.


Right, but let’s say I point (currently at Siteground) at ns.digitalocean.dns

Now, suppose somebody else at Digital Ocean creates a zone for How does Digital Ocean decide which webserver IP to point at?

Well, that might be more of a question for Digital Ocean, as it’s about how their security setup works.

But I figure they wouldn’t allow more than one user to create a zone for your domain. So once you’ve added your domain, no one else should be able to add that same domain. They may even have additional checks to ensure you own the domain.

If you have questions on that security though, you may want to ask Digital Ocean about how their setup works.