大网数据广告活动
服务器运维问答

Understanding NS Record and Authorative Server Better

· 52CE 我爱测

I'm trying to understand how DNS works. Even after a quiet amount of searching it's still not clear to me how NS record works. Now I've following two facts. Fact 1 (based on this article , the first paragraph) An NS record or (na…

问题原文

原帖链接 · Razib · CC BY-SA 4.0

I'm trying to understand how DNS works. Even after a quiet amount of searching it's still not clear to me how NS record works. Now I've following two facts.

Fact 1 (based on this article, the first paragraph)

An NS record or (name server record) tells recursive name servers which name servers are authoritative for a zone.

Fact 2 (here, under the authorative name server section)

The authoritative nameserver contains information specific to the domain name it serves (e.g. google.com) and it can provide a recursive resolver with the IP address of that server found in the DNS A record...

Now, say I choose company A for my domain name provider - I've bought my domain name from A while I'm hosting my web app at the server of company B.

So based on fact 1 and 2 my question are -

(1) Will company A (from where I bought the domain name) will work for me as an authoritative server and it will point to the B's server through (A record)?

(2) Since the NS record says where my authoritative server is, so It means the NS record will not be stored in the authoritative server. Is this assumption correct?

(3) Somewhere I've to set all the DNS record (like A-record, MX-record, CNAME-record) so it will point to my web app hosting server correctly. An authoritative server is a place for this, which I've to maintain by myself?

Thanks in advance. (I know I've asked a lot in the same post. You might find it boring, I'm sorry for that.)

社区高分解答

原帖链接 · Håkan Lindqvist · CC BY-SA 4.0

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.

  1. 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.
  2. 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 authoritative NS records are part of the child zone. These sets of NS records should always match! (Remember to update both)
  3. 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).

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-06-24)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。