In Godaddy I have a domain example1.com and www.example1.com with valid A record to my Centos 7 server's IP.
I 've created hostnames for that domain, ns1.example1.com, ns2.example1.com with the same server IP.
I have another doamin example2.com in Godaddy in which I want to use the custom nameservers. So I put in the nameserver field ns1.example1.com and ns2.example1.com.
In my server's named.conf
zone "example2.com" IN {
type master;
file "/etc/named/foo.zone";
allow-update { none; };
};
In foo.zone:
$TTL 600
@ 3600 SOA example2.com (
example2.com. ; address of responsible party
2016072701 ; serial number
3600 ; refresh period
600 ; retry period
604800 ; expire time
1800 ) ; minimum ttl
86400 NS example2.com.
14400 A 1.2.3.4
mail 14400 A 1.2.3.4
I expected then that example2.com and mail.example2.com to resolve to 1.2.3.4.
What am I doing wrong ?
Thanks a lot.