I'm having trouble setting up name servers. I have a domain name. I have a VPS which is running CentOS with Bind. I have registered the domain using GoDaddy. I want to setup my own name servers, i.e. ns1.domain.com and ns2.domain.com

What settings do I need to use to do that in Godaddy , as well as my VPS. I have WHM installed on my VPS so configuration should not be too difficult.


you have to change your godaddy domain on the web interface specifying your VPS as ns1 and you have to look up for a good ns2 service somewhere for example http://freedns.afraid.org/.

on your VPS linux you have to write the zone file looks like this:

$ORIGIN example.com
$TTL 86400
@     IN     SOA    dns1.example.com.     hostmaster.example.com. (
                    2001062501 ; serial
                    21600      ; refresh after 6 hours
                    3600       ; retry after 1 hour
                    604800     ; expire after 1 week
                    86400 )    ; minimum TTL of 1 day

      IN     NS     dns1.example.com.
      IN     NS     dns2.example.com.

      IN     MX     10     mail.example.com.
      IN     MX     20     mail2.example.com.

             IN     A

server1      IN     A
server2      IN     A
dns1         IN     A
dns2         IN     A

ftp          IN     CNAME   server1
mail         IN     CNAME   server1
mail2        IN     CNAME   server2
www          IN     CNAME   server2

I would recommend that you understand how DNS works first. It is quite a bind to configure and get it all up and running. You will need to familiarise yourself with the different kinds of zones and records that you will need.

Getting GoDaddy to use your authoritative servers is probably the easiest step involved. You will just need to login to GoDaddy and change your DNS settings. It may take up to 24 hours for the changes to propagate.


I would strongly suggest you pick up an O'Reilly book or something similar before trying to administrate your own DNS. With a few hours of research, you'll be a lot better prepared to setup a simple bind server that'll run forever and not be a constant source of support issues.

I'm assuming that WHM refers to the cPanel webhost manager stuff? I've not messed with cPanel in a good while, but if memory servers, it was a lot more complicated than bind.

Your Answer

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