September 29th in Linux/Unix by pbu .

Sample DNS Zone File for BIND

Sample Zone file for a domain with 2 nameservers ns1.example.com and ns2.example.com 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 "example.com" {
type master;
file "example.com.db";
}

$TTL 14400
$ORIGIN example.com.

; Specify the primary nameserver ns1.example.com in SOA
@ 14400 IN SOA ns1.example.com. webmaster.example.com. (
                                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 11.11.11.11

; TWO nameserver names

       IN NS ns1.example.com.
       IN NS ns2.example.com.

; Nameservers and their corresponding IPs

ns1  IN A 11.11.11.11
ns2  IN A 22.22.22.22

; Specify here any Aliases using CNAME record

www IN CNAME example.com.
ftp IN CNAME example.com.

; Set Mail Exchanger record with priority

mail IN MX 10 example.com.

How to test the DNS server?

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

http://www.intodns.com (free)
http://www.pingability.com (free)
http://www.dnsstuff.com (paid)

Good luck!

Similar Posts:

Share and Enjoy:
  • del.icio.us
  • digg
  • StumbleUpon
  • Technorati
  • DZone
  • Facebook
  • FriendFeed
  • Reddit
  • RSS
  • Twitter

One Comment

  • Alex
    June 23, 2009

Leave A Comment.