Here are the steps:
- Locate named.conf and go to that folder.
- Add DNS entries for your nameserver.
- Reload the nameserver daemon.
$ sudo /etc/init.d/bind9 reload - Ping the nameservers, and they should resolve to the correct IP.
If they do not, edit /etc/resolv.conf and add the following line above all other lines beginning with “nameserver”, add:
nameserver 127.0.0.1 - Go to your registrar of your domain name, and register the nameservers to point to the your nameserver IP.
Edit the pri.yourname.com file for the domain you are adding nameservers for.
Add these two lines at the bottom of the file:
ns1 IN A 10.10.10.10 (replace with your nameserver IP)
ns2 IN A 10.10.10.10
By the way, you can host your website and nameservers on the same IP.