Understanding NS Record and Authorative Server Better
Solution 1:
There are actually three entities involved in the scenario in the question (at least conceptually):
- Registrar ("A" in question)
- DNS hosting provider
- Web hosting provider ("B" in question)
In theory the role of the registrar is only to register domain names with the registry and to update parameters for registered domain names in the registry on behalf of the registrant (customer).
In practice many registrars also provide DNS hosting services in addition to domain name registration, either for free as a value-add or as an upsell option.
Worth noting in such cases is that the same entity being both registrar and DNS hosting provider is coincidental in terms of how the system actually works.
Conceptually the registrant (customer) tells the registrar which nameservers they want to use for their domain name and the registrar enters these into the registry, after which corresponding NS
records are published in the parent zone.
In the case where you also use DNS hosting services provided by the registrar company, the nameserver information for their own nameservers is typically entered without any explicit action from the registrant.
- This depends entirely on whether the registrar ("company A") also provide DNS hosting services (as per the note above), and obviously also if the registrant chooses to use these.
- There are
NS
records in the delegation data in the parent zone in order to let resolvers actually find the authoritative nameservers of the child zone, but the authoritativeNS
records are part of the child zone. These sets ofNS
records should always match! (Remember to update both) - You can run your own nameserver, if you desire, or you can use the services of some DNS hosting provider (as noted earlier, the registrar company may provide such services, but you can also use any other DNS hosting provider).