What is an NS Lookup


Nameserver lookup or NS Lookup is a tool for getting name server records of any domain name. NS is a record type of DNS, and it is set up via a hosting provider. Whenever a browser sends a DNS request to a DNS server, it sends back the nameserver records, and the name servers are then used to get the real IP address behind a domain name. So, it's handy to verify your Nameserver records to check if they are correctly entered in your hosting management interface to avoid any downtime.



What are a nameserver and its purpose?

NS stands for the nameserver. NS records are the nameserver records that contain the information of the nameservers associated with the domain.

These are the DNS records type that indicates

  • Which DNS server is authoritative for that domain?
  • Which DNS server is authorized to handle the queries related to that domain?
  • Which DNS server contains the actual DNS records or the DNS server responsible for managing the DNS records for that domain?
  • Where to go to find the domain's IP address.

An example of an NS record may look like the following.

RecordTypeValueTTL
mydomain.comNSns1.mydomain.com3600
  • mydomain.com represents the domain of the record
  • NS represents the DNS record type.
  • ns1.mydomain.com represents the value of the record. That is the nameserver for that domain.
  • 3600 is TTL (time to live). It is the time for which the DNS server caches the record. On the expiry of that time, the server goes for the fresh DNS records data.

The nameserver can never point to the canonical name (CNAME) record.

Can one domain have multiple nameservers?

The domain is often configured for multiple NS records. These are the Primary and secondary NS records.

The multiple NS records indicate the primary and the secondary (backup) nameservers for that domain. If the primary nameserver is unable to respond, the secondary nameserver responds to that query.

Typically, there is one primary nameserver, and several secondary nameservers store the exact copy of the primary nameserver's DNS records. Updating the primary nameserver's record will trigger the update of the secondary nameservers as well.

Without adequately configured NS records, the website, email, or other domain services will not work. The user will be unable to load a website or application.

An example of multiple NS records may look like the following.

RecordTypeValueTTL
google.comNSns1.google.com3600
google.comNSns2.google.com3600

How many nameservers can a domain have?

At a minimum, you need only two DNS servers for each of your domains. You can also extend this to more than two for your domain, but usually, three is the maximum unless you have multiple server farms where you would want to share the DNS lookup load.

When should NS records be updated or changed?

Domain administrator(s) should update their NS records when they need to change their nameservers. They can also update their NS records when they want their subdomain to point to the secondary nameserver.

In the example above, the primary nameserver for mydomain.com is ns1.mydomain.com. If the mydomain.com admin wanted blog.mydomain.com to resolve through ns1.mydomain.com, they could set this up by updating the NS records.

When NS records are updated, it may take several hours to replicate the changes throughout the DNS. Usually, it takes 48 hours. After that time, perform the DNS Propagation to check whether these changes are fully propagated or not around the globe.

Where are your domain's nameservers located?

When you register your domain through a domain registrar, your domain is usually first pointed to your domain registrar's nameservers.

Your domain registrar is the place where you can edit your domain's nameservers. If you want to use these nameservers, edit your DNS records to point your domain name toward your hosting provider.

But experts suggest that you should use the nameservers provided by your web hosting. However, it depends upon your requirements and needs.

How to check if domain nameservers are pointed correctly?

Note down your domain's nameservers. After the NS records updates or changes, it takes a few hours to reflect those changes fully. Go to the NS lookup tool and enter a domain name to check that the domain's nameservers are now pointed correctly.

Are DNS and nameserver the same?

The DNS stands for Domain Name System or Domain Naming System, Domain Name Service depending upon whom you talk to. It is a global system that translates the IP addresses to human-readable domain names.

On the other hand, a nameserver is used to locate the DNS server. A nameserver is the address of the DNS server that hosts the records for that domain.

More free DNS tools are also available.