Is it possible to have a CNAME record on a domain point to a nameserver and have the nameserver serve records?

935 Views Asked by At

I have two nameservers, namely ns3. ns4. and I would like have the nameservers names changed for multiple domains, but the process takes time, so for the time being I would like to do the following:

ns1.<domain> CNAME ns3.<domain>
ns2.<domain> CNAME ns4.<domain>

And

ns3.<domain> A IP
ns4.<domain> A IP

If I then set the nameservers for a domain to ns1 and ns2 would the nameserver records on ns3 ns4 get resolved?

1

There are 1 best solutions below

2
Santiago On

You cannot make that a NS record be a CNAME record never.

What you can do is to have the NS record pointed to a A/AAAA or a CNAME record.

So if you need to mass change an NS route you must adjust the CNAME or the A/AAAA that is pointing to.

Since NS and A and AAAA and CNAME are different types of records (with different functions), you must update each one, unfortunately.

But referring to change:

IN NS ns1.example.com.
IN NS ns2.example.com.

to

IN NS ns3.example.com.
IN NS ns4.example.com.

This must be changed in the NS record one by one.

If I then set the nameservers for a domain to ns1 and ns2 would the nameserver records on ns3 ns4 get resolved?

Yes, if you make something like.

EXAMPLE.COM. IN NS NS3.EXAMPLE.COM
EXAMPLE.COM. IN NS NS4.EXAMPLE.COM
EXAMPLE.COM. IN CNAME NS3 NS2.EXAMPLE.COM
EXAMPLE.COM. IN CNAME NS4 NS1.EXAMPLE.COM
EXAMPLE.COM. IN A/AAAA NS2 [SOME IP GOES HERE]
EXAMPLE.COM. IN A/AAAA NS1 [SOME IP GOES HERE]

This for sure will resolve.