Search code examples
dnsnameservers

Defining two sub domains of my domain as nameservers of another domain


Suppose that I own example.com that is served by my own DNS server and I can create every records that I want.

Now imagine that one of my friends get a new domain called new-domain.com and I want to help him manage his domain with his own DNS server.

So in my dns system for example.com, I create two A records as:

my.ns1.example.com -> some.ip.addr

and

my.ns2.example.com -> some.ip.addr

(some.ip.addr is the ip address of his DNS server)

and ask him to set my.ns1.example.com and my.ns2.example.com as name servers for his domain.

But he cannot set them because it gets invalid nameserver error!

Its my understanding that because example.com is working properly in DNS system and thus my.ns1.example.com and my.ns2.example.com are resolved to the IP address properly, so nothing can prevent them to be used as nameservers.

I searched around and found that some people say the nameservers should be registered. I understand registering when we have to ask for setting glue records, but for this case I have no idea why would we need to register those name.

To be more specific with real life example, why would jobs.ns.cloudflare.com is a valid nameserver but www.cloudflare.com is not?


Solution

  • I asked the same question on serverfault.com with this link

    There, I quote important part of the answer here,

    From a pure DNS perspective, an authoritative nameserver (such as those for com) should not perform any kind of recursion to learn the IP address of the nameservers that are defined in your example.com zone. Instead, the registry permits registrars to add glue records to the com domain, and those registrars can provide a user interface so that the owners of the domains that these custom nameservers live in can do so. (example: Namecheap - How do I register personal nameservers for my domain?)

    (To address the elephant in the room...no, these glue records are not strictly required. But policies are policies, and if the registrar interface requires the registry level glue to be present, you have little choice in the matter.)

    While the answer does not answer my updated part of the question, I picked it as the answer and decided to ask another question.