Bind9 zone templates

Here’s a full zone template:

mydomain.tld.       IN      SOA     ns1.joel.co.in. admin.mydomain.tld. (
                   2007010401           ; Serial
                         3600           ; Refresh [1h]
                          600           ; Retry   [10m]
                      1814400           ; Expire  [1d]
                          600 )         ; Negative Cache TTL [1h]
;
mydomain.tld.     IN      NS      ns1.joel.co.in.
mydomain.tld.      IN      NS      ns2.joel.co.in.
mydomain.tld.      IN      NS      ns3.joel.co.in.
mydomain.tld.     IN      A       198.23.228.223
www.mydomain.tld. IN      A       198.23.228.223
ns1.joel.co.in.           IN      A       199.188.75.23
ns2.joel.co.in.           IN      A       38.114.103.106
ns3.joel.co.in.           IN      A       38.127.98.233
mail.mydomain.tld.        3600    IN      CNAME   ghs.google.com.
*.mydomain.tld.   3600    IN      CNAME   mydomain.tld.
mydomain.tld.      IN      MX      10 aspmx.l.google.com.
mydomain.tld.      IN     MX      20 alt1.aspmx.l.google.com.
mydomain.tld.      IN      MX      20 alt2.aspmx.l.google.com.
mydomain.tld.      IN     MX      30 aspmx2.googlemail.com.
mydomain.tld.      IN     MX      30 aspmx3.googlemail.com.
mydomain.tld.      IN     MX      30 aspmx4.googlemail.com.

Note that each entry terminates with a “.” (dot) unless it’s an ip address. Note the blank line on the last line.

Take care to replace the ips with those of yours.

The additional part required for Gapps is:

mydomain.tld.      IN      MX      10 aspmx.l.google.com.
mydomain.tld.      IN     MX      20 alt1.aspmx.l.google.com.
mydomain.tld.      IN      MX      20 alt2.aspmx.l.google.com.
mydomain.tld.      IN     MX      30 aspmx2.googlemail.com.
mydomain.tld.      IN     MX      30 aspmx3.googlemail.com.
mydomain.tld.      IN     MX      30 aspmx4.googlemail.com.

Without Gapps, it is:

mydomain.tld.       IN      SOA     ns1.joel.co.in. admin.mydomain.tld. (
                   2007010401           ; Serial
                         3600           ; Refresh [1h]
                          600           ; Retry   [10m]
                      1814400           ; Expire  [1d]
                          600 )         ; Negative Cache TTL [1h]
;
mydomain.tld.     IN      NS      ns1.joel.co.in.
mydomain.tld.      IN      NS      ns2.joel.co.in.
mydomain.tld.      IN      NS      ns3.joel.co.in.
mydomain.tld.     IN      A       198.23.228.223
www.mydomain.tld. IN      A       198.23.228.223
ns1.joel.co.in.           IN      A       199.188.75.23
ns2.joel.co.in.           IN      A       38.114.103.106
ns3.joel.co.in.           IN      A       38.127.98.233
mail.mydomain.tld.        3600    IN      CNAME   ghs.google.com.
*.mydomain.tld.   3600    IN      CNAME   mydomain.tld.