Example of a DNS domain zone in BIND:
; This is a comment in zone file
domain.com. 7200 IN SOA ns1.domain.com. hostmaster.domain.com.(
2014062301 ;Serial Number
7200 ;Refresh - 2 hours
7200 ;Retry - 2 hours
604800 ;Expire
600 ;Minimum - 10 minutes
)
; in below example, we could have used the @ sign instead of domain.com. with dot at the end - it is the same:
domain.com. 600 IN NS ns1.domain.com.
domain.com. 600 IN NS ns2.domain.com.
;in below example, we could have used ns1 (or ns2) instead of ns1.domain.com. with dot at the end - it is the same:
ns1.domain.com. 600 IN A 192.168.1.10
ns2.domain.com. 600 IN A 192.168.2.10
domain.com. 600 IN A 192.168.1.12
;in below example, we could have used www.domain.com. instead of www - it is the same:
www 600 IN CNAME domain.com.
; Below I used @ sign instead of domain.com. for showing you more examples:
@ 600 IN MX 10 mx1.domain.com.
@ 600 IN MX 20 mx2.domain.com.
; Below I used mx1 (and mx2) instead of mx1.domain.com. (and mx2.comentum.com) for showing you more examples:
mx1 600 IN A 192.168.1.11
mx2 600 IN A 192.168.2.11
; Below I could have used the @ sign instead of domain.com. - it means the same in the DNS world:
domain.com. 600 IN TXT "v=spf1 include:domain.com ip4:192.168.1.5 ~all"