Add this to etc/named.conf
zone "yourdomain.com" IN {
type master;
file "/var/named/yourdomain.com.hosts";
};
Navigate to /var/named/
Create a file called yourdomain.com.hosts
Add this:
$ttl 34800
;
;
;yourdomain.com.hosts
;
@ IN SOA yourdomain.com. webmaster.yourdomain.com. (
2003070801
1200
120
1209600
1200 )
;Define the nameservers
IN NS your.nameserver.com.
;Define the hosts in this zone
www.yourdomain.com. IN A 12.34.56
yourdomain.com. IN A 12.34.56
;Define the aliases in this zone
*.yourdomain.com. IN CNAME yourdomain.com.
yourdomain.com. IN CNAME yourdomain.com.
Then restart named (BIND).