Let's assume that I use EasyDNS as a DNS service provider.
There I have an A
-record entry for ns-at-premises.example.com
pointing to the IP address 192.0.2.123
, where a DNS server is located, at my premises, listening on port 53.
There's also a CNAME
-record entry for ns.example.com
with the value of ns-at-premises.example.com
(I read somewhere that NS
-Records should get CNAMEd
).
example.com
has an A
-record of 192.0.2.234
, a VPS hosted on AWS and www.example.com
has a CNAME
of example.com
, but that is irrelevant.
There is a subdomain dynamic.example.com
which has a NS
-Record of ns.example.com
, which will send any request for *.dynamic.example.com
or dynamic.example.com
to be resolved at 192.0.2.123
, where *
can be anyting.
--
What I now want to do is add a backup nameserver in case 192.0.2.123
goes down. This means that a port-53 server at 192.0.2.124
should get queried in case 192.0.2.123
is not reachable.
I would add an A
-Record for ns-backup.example.com
pointing to 192.0.2.124
, and a CNAME
for ns2.example.com
with the value of ns-backup.example.com
--
The question is, how can I now tell EasyDNS that dynamic.example.com
should query or redirect to ns2.example.com
when ns.example.com
is not reachable?
I read that just adding a second NS
-Record with the value of ns2.example.com
to dynamic.example.com
would result in clients using ns.example.com
and ns2.example.com
for lookups in a Round-Robin fashion, but what I actually want is that ns2.example.com
only gets queried if ns.example.com
is down.
So I am actually looking for a way to add weights to the nameservers, like MX
-Records are able to provide.
Is this possible? Or must I settle with the idea that none of those two nameservers will be a primary and deal with them as loadbalanced non-prioritized servers?