Background

The 'NS' Resource Record (RR) is standarized in RFC 1035 and defines the authoritative name servers for the domain or zone.
There should be a minimum of two name servers defined per domain or zone.


Details

RR Type: NS
ID: 2 (0x0002)
Defining RFC: RFC 1035,  Section 3.3.11,  Page 18
Description: Name Server Record
Function: Delegates a DNS zone to use the given authoritative name servers.
Status: Active

'NS' RR Syntax

name ttl class type rdata {nsdname}

RR Field Example Description
name By default, DNS uses the parent domain name when creating a name server record. You can specify a host or child name, but in most deployments, the field is left blank.
ttl This is the records time to live value (in seconds). If there is no TTL specified, the zone's default $TTL Directive will be used.
class IN Specifies the class to be 'Internet'.
type NS Specifies the RDATA field will contain data in the NS RDATA format.
rdata nsdname ns1.yourdomain.com. Specifies the name server that is authoritative for the domain.

Examples

Snippets from a fictitious forward lookup 'yourdomain.com' zone file

Typical 'NS' Record Entries

;
;   Zone NS records
;
IN NS ns1.yourdomain.com.
ns1.yourdomain.com. IN A 65.22.6.79
ns1.yourdomain.com. IN AAAA 2a01:8840:6::1
IN NS ns2.yourdomain.com.
ns2.yourdomain.com. IN A 65.22.7.1
ns2.yourdomain.com. IN AAAA 2a01:8840:7::1

Invalid Configurations

CNAME records should not be used with either NS or MX records.
Although the following example may work, its technically invalid and should be avoided.

;
;   Zone records
;
IN NS ns1.yourdomain.com.
ns1.yourdomain.com. IN CNAME server01.yourdomain.com.
server01 IN A 65.22.6.79
server01 IN AAAA 2a01:8840:6::1


See Also




This content was last updated on December 10, 2020
An error has occurred. This application may no longer respond until reloaded. Reload 🗙