So I have a domain name: www.mydomain.com

It is registered with Godaddy.com. In the Godaddy user area I have created private nameservers for my domain (ns1.mydomain.com, ns2.mydomain.com) and assigned them two IPs that are dedicated to my VPS.

Now, what do I need to do on the VPS box to make it all work? I have root access to the VPS, I know basic linux commands (cd, ls, mk, rm, nano, wget etc) so I can work in the console but I don't know where to set the nameservers of the VPS to ns1.mydomain.com and ns2.mydomain.com.

What file should I edit?

Also, I have installed Virtualmin on my VPS because I am planning to host more than one domain there.

  • 2
    How is advice on configuring a DNS server not a sysadmin-related? Jan 7, 2010 at 0:55
  • Sometimes the non-sysadmin vote is taken simply because it's the nearest to what the voter intended, rather than an exact match. I'd personally like to so one that says something like "not sysadmin related in the context of this site". i.e. Read the FAQ before posting. Jan 7, 2010 at 6:10

1 Answer 1


You'd do well to let somebody else host your DNS if you're not familiar with running a DNS server, in my opinion.

Having said that, have a look at this HOWTO article, the debian docs, and this DNS Installation and Setup using BIND9 for some pointers on installing and running a BIND9-based name server on Debian. (The last two links are to dated materials, but at first glance they look up-to-date enough to get you started. Better more to read than less, IMO.)

If you're just playing around then "have at", but if this is something business-critical then you really might want to look at some professional DNS hosting. In particular, it sounds like you're going to host both DNS servers for your domain on the same box. That's going to give your poor redundancy (i.e. no redundancy) and isn't really appropriate for a business-critical web site.

  • It's not busines critical. I just bought a VPS to play around with it and get better in Linux. But thanks for the link :) Jan 7, 2010 at 0:57
  • @Richard: whilst you're still playing about, www.afraid.org offers free and simple (and the ability for silly) DNS Hosting and lets you do it all from a simple web page. They also happen to be really good :) Jan 7, 2010 at 1:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.