What Is a DNS NS Record?
Every domain name has a designated owner. When you’re registering a new domain, the registrar will provide you with a nameserver. A DNS NS record is what indicates which nameserver is authoritative for this domain; therefore, each authoritative DNS (domain name system) server must have an NS record. In this article, we’ll demonstrate the functions of nameserver (NS) records in greater detail.
What is an NS record?
NS record stands for nameserver record. It’s a type of DNS record specifying a subdomain's authoritative nameservers. In short, NS records identify the servers responsible for handling requests for that domain.

When you try to access a website through its domain name, your device contacts a DNS resolver. This resolver looks up the domain name's IP address using DNS records. The NS record within the DNS settings directs the resolver to the nameservers holding the key to the domain's information.
A nameserver holds all of the records for one or more domains, along with the DNS zone files. The zone file contains details such as a domain's IP address, email server location, and security settings.
This resource record type is primarily used to divide your domain into subdomains. A subdomain indicates that you’re delegating a portion of a domain name to a different set of nameservers. For that reason, we create NS records to point the hostname, which is the subdomain's name, to different nameservers.
Nameserver records were introduced in 1987, along with a number of other DNS record types, as part of the original DNS specifications outlined in RFC 1034 and 1035. These records laid the foundation of the domain name system that we rely on today. The domain administrator is responsible for maintaining the accuracy of the DNS records stored on the authoritative nameserver.
What is a nameserver?
To fully understand NS records, we must first understand a nameserver (NS). An NS is an Internet server specialized in handling queries regarding the location of the domain name’s various services.
Also known as a DNS server, a nameserver defines your domain’s current DNS provider. It tells the Internet where to look for the DNS records of a particular domain that you own. These records, like A records, SOA records, MX records, and CNAME records, are essential for directing users to the correct website or service.
If you change the NS records to point away from your domain hosting provider (which we will call Example Provider) without taking any further action, you will most likely lose all the DNS records currently hosted on Example Provider.
This is because the Example Provider nameservers are no longer serving those records. Ideally, you want to replicate all DNS records before switching between vendors.
Most registrars automatically provide nameservers for all domains registered with them. This makes the initial setup process relatively simple for customers. It also guarantees the immediate functioning of a domain.
What are authoritative and non-authoritative name servers?
Unlike other types of DNS servers, an authoritative nameserver contains the original DNS records. It is the source of truth for a domain's DNS information.
An authoritative server is, therefore, a nameserver delegated to a DNS zone and is responsible for holding the official set of DNS records for that zone.
A DNS zone is simply a specific portion of the DNS namespace encompassing all the DNS records for a particular subdomain. For example, the zone example.com would include all DNS records for subdomains like www.example.com and mail.example.com.
Here are good examples of authoritative nameservers:
ns01.domaincontrol.com
ns02.domaincontrol.com
Most domains have at least two DNS servers to avoid interrupted services. This redundancy is vital for maintaining domain accessibility. With multiple nameservers listed, the DNS lookup can still be completed successfully through a secondary DNS server, even if the primary server encounters an issue.
There can only be one primary (master) authoritative nameserver for a zone. Secondary nameservers, on the other hand, are like backups. They obtain a copy of the zone data from the primary server through zone transfer.
Interestingly, secondary nameservers are still considered authoritative even though they are copies. They can respond to DNS requests for the domain with the same validity as the primary server.
All these authoritative servers are equally capable of responding to DNS requests for records within their assigned zone.
A non-authoritative server, however, is a type of nameserver that does not store the definitive DNS records for a domain. These servers rely on information from other sources, mainly authoritative nameservers.
What does an NS record look like?
According to RFC 1035, the format of an NS record in a DNS zone file is similar to that of other DNS records with which we are familiar.
Domain/host | Record type | Name server/Point to: | TTL |
Example.com | NS | ns1.example.com | 86400 |
In this example:
- example.com is the domain for which these NS records are valid.
- NS denotes that this is a nameserver record.
- ns1.example.com is the authoritative DNS server for your example.com.
- 86400 is the TTL, indicating that the records can be cached for 86,400 seconds (24 hours).
Since the registrar knows your authoritative NS, you must put NS record entries for your root domain at your DNS host.
What do NS records do?
The NS records are a signpost within the DNS system. Their functions are as follows:
- Specifying DNS servers. NS records act like directory pointers. They specify authoritative DNS servers for a zone – both primary and secondary nameservers.
- The primary DNS server is for resolving the DNS zone’s names into IP addresses.
- The secondary DNS server provides redundancy by also being able to return the IP address related to a domain name.
- Enabling DNS lookups. NS records enable successful DNS lookups by pointing to the authoritative nameservers. When you try to access a website through its domain name, the NS record directs the resolver to the correct server that can provide the IP address needed to connect to the website.
- Ensuring DNS servers can function. DNS servers would not be able to function as intended, as they wouldn't be identified correctly in the DNS hierarchy. This identification helps direct queries to the correct servers and allows the resolution of domain names
- Domain ownership and control. When you buy a domain name, you configure it to use specific nameservers. These nameservers are responsible for storing the zone file for the domain you acquire.
When to update or change NS records
You may need to update your NS records for some critical reasons. Change your nameserver records only when the following occurs.
If you want your domain to be managed by different nameservers
Suppose the administrator of example.com wants blog.example.com to be managed by ns2.exampleserver.com instead of its current nameserver. They can achieve this by updating the NS record to point to ns2.exampleserver.com.
If you wish to assign different nameservers to subdomains
Sometimes, you might want a subdomain to use nameservers different from the main domain.
For example, if the administrator of example.com wants blog.example.com to use ns1.exampleserver.com instead of ns2.exampleserver.com, they would need to update the NS record for blog.example.com.
They would set it so that blog.example.com uses ns1 as its primary nameserver and ns2 as a backup. This configuration ensures redundancy and reliability, as DNS changes often automatically include backup nameservers.
How do you update NS records?
To update the NS records for your domain, follow these steps:
- Access DNS Management Console. As the administrator, log into their DNS management console, which your domain registrar or DNS hosting vendor will provide.
- Navigate to the Record Types page. Go to the Record Types page or a similar section where DNS records can be managed.
- Update the NS records. Then, update the relevant nameserver records to specify the new nameservers for the domain or subdomain.
- Allow for propogation. After updating, these changes need some time to propagate through the DNS system. The process normally takes a few hours.
Domain administrators can ensure that their domains are correctly resolved via the desired nameservers to improve the reliability of DNS services.
Keep in mind, however, that after modifying NS records, it can take several hours for the changes to propagate globally across all DNS servers. Users might experience issues accessing your website during this time.
How to create an NS record
Creating an NS record isn’t an involved process. Most DNS providers offer tutorials that walk you through the process of adding one. Here's a step-by-step guide to help you set NS records in DNS.
- Log in. Log in to your DNS provider's control panel or service portal.
- Navigate to DNS management. From your DNS portal, go to Manage > DNS > Zones. In the Zones section, click the Create button.
- Create NS record. Click on Record, and select NS record from the list of options. Input these NS record details:
- Name: Enter the name for the NS record.
- Zone: Choose the appropriate DNS zone from the available options.
- Nameserver: Input the fully qualified domain name (FQDN) of the nameserver you are assigning.
- Description: Write a brief description of the NS record.
- TTL: Specify the TTL value.
- Add tags. Tags can help organize and manage your DNS records.
- Save your settings. After you review all the information, click the Save button to apply your settings and create the NS record.
These above steps are nearly common across most DNS providers.
Challenges in NS record configuration
Configuring NS records is simple, but there are potential pitfalls to be aware of. They include:
- Propagation delays. When you update nameserver records, the changes must propagate across the DNS system. This involves your registrar updating the top-level domain (TLD) servers. The time it takes for changes to take effect varies significantly.
- Account security. Use a strong, unique password for your registrar account and enable multi-factor authentication if available. Attackers who have access to your account can change your NS records and redirect traffic to malicious servers.
- Configuration errors. Typos and copy-paste mistakes during NS record configuration can result in major downtime for your domain. Setting a low TTL value for your nameserver records can be helpful. it instructs other DNS servers to refresh their cache with the latest information more frequently, minimizing the impact of any configuration errors.
Frequently asked questions
What’s the difference between an NS record and SOA record?
NS records point to the authoritative nameservers that hold a domain's DNS records, while SOA records provide administrative information about the domain zone itself.
What’s the requirement for an NS record?
One major requirement of nameserver records is that there should be at least two nameservers for each domain, each resolving to a unique IP address.
How do you check the NS records for a domain?
There are several free online tools you can use to check the type of DNS record that your domain is set up with.