Sample DNS Zone File for BIND

Sample Zone file for a domain with 2 nameservers and for BIND9. You can use this template to define your own nameservers. Just do changes on the domain name and IP addresses.

Be sure to include the below statement in your named.conf
I am assuming that you are running Bind9 or later version in your VPS or dedicated server.

zone "" {
type master;
file "";

$TTL 14400

; Specify the primary nameserver in SOA
@ 14400 IN SOA (
                                2008092902 ; Serial in YYYYMMDDXX (XX is increment)
                                10800; refresh seconds
                                3600; retry
                                604800; expire
                                38400; minimum
; Website IP Address specified in A record

       IN A

; TWO nameserver names

       IN NS
       IN NS

; Nameservers and their corresponding IPs

ns1  IN A
ns2  IN A

; Specify here any Aliases using CNAME record


; Set Mail Exchanger record with priority

mail IN MX 10

How to test the DNS server?

Just goto the following sites, enter the domain name and you will see the test results. (free) (free) (paid)

Good luck!

Similar Posts:


Balakrishnan Prabhu

Mr. Balakrishnan Prabhu is the founder of Corpocrat magazine. He is also the founder of Best Citizenships (BC), assisting wealthy individuals with with global citizenship and residency programs in Europe. His other interests are Linux, Machine learning, Wordpress, etc. You can contact him here

  • Alex


    I have registerd private nameservers in my dedicated server for and want to host a second domain at the same server. I went to and put the same nameservers for the into second domain’s nameservers info. Now for nslookup I get servfail response.

    How the conf files in my dedicated server must be modified to host multiple domains using private nameservers for one domain?


  • Another free solution is

  • Jerome

    I’m really enjoying the theme/design of your web site. Do you ever run into any web browser compatibility issues? A few of my blog visitors have complained about my website not working correctly in Explorer but looks great in Opera. Do you have any tips to help fix this issue?