What is a DNS NS Record?

DNS NS Record (Nameserver Record) is a type of DNS record that maps a domain name to an authorized nameserver for that domain.

A Name Server is a computer that stores information about domain names and their associated IP addresses.

DNS NS Record Function:

  • Specifies the name server responsible for providing DNS information for a particular domain name.
  • Allows DNS clients to find the correct name server to perform DNS queries.
  • Helps prevent DNS spoofing attacks by ensuring that DNS clients only receive DNS information from authorized name servers.

Structure of DNS NS Record:

A DNS NS Record has the following structure:

name_domain. IN NS name_server 
  • name_domain: The domain name associated with the record.
  • IN: Indicates that this is an NS type record.
  • name_server: The name of the name server authorized for the domain name.

Example of a DNS NS Record:

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

In this example, "example.com" has two authorized name servers: "ns1.example.com" and "ns2.example.com". ns1.example.com. example.com. IN NS ns2.example.com.

This record shows that the domain "example.com" is served by two name servers, "ns1.example.com" and "ns2.example.com".