What a nameserver is
A nameserver is a DNS server that answers queries about the domains it is authoritative for. When a nameserver is authoritative for a domain, resolvers (the programs that look up answers for users) consider its responses for that domain.
DNS is the whole system. A nameserver is one server inside it. It has complete information about part of the domain space, plus pointers to other servers that lead to the rest.
Authoritative and recursive nameservers
Every name server must support non-recursive queries. It answers from local information and returns an error, an answer, or a referral to a server closer to the answer. Recursive service is optional, and a server may restrict which clients can use it. In recursive mode the server acts as a resolver and returns an error or the answer, never referrals.
Delegation requirements say authoritative nameservers must not provide recursive service. That is a rule for delegated servers, not a law of every deployment.
So "best nameserver" mixes two choices. Which authoritative nameservers host your zone (your set of records) is a DNS-provider decision this site does not rank. Which recursive resolver your devices use is a separate choice.
resolver -> nameserver (referral to a closer server)
resolver -> closer nameserver (referral)
resolver -> authoritative nameserver (final answer)
The parent zone's NS records point to the child zone's servers.
Nameservers and NS records
NS records in the parent zone mark the delegation, the point where a child zone begins. The child zone has no explicit reference to its parent. The delegation requirements say a delegation must list at least two NS records, and the hosts must not resolve to the same IP address. The NS set served by the authoritative servers must match the set in the parent.
example.com. 3600 IN NS ns1.example.net.
example.com. 3600 IN NS ns2.example.net.
These two servers sit on different hosts.
Cloudflare documents its standard nameservers as <proper_name>.ns.cloudflare.com. Cloudflare assigns them automatically when you add the domain. Per Cloudflare, branded or custom nameservers are available depending on plan, and branded names cannot be changed. You cannot preset them at the registrar before the zone exists. Presetting leads to a new set being assigned.
How to check and change your nameservers
Check your domain's nameservers with the NS lookup, or run:
dig NS example.com +short
Expect one hostname per line. This is the format, not a real capture:
ns1.example.net.
ns2.example.net.
On Windows, use Resolve-DnsName -Type NS example.com.
Nameservers are typically changed at the registrar, and the registrar's documentation has the steps. Authoritative nameservers hold the definitive records. An MX or TXT record you did not copy to the new provider will not be answered.
- Note every current record.
- Lower the TTL (how long caches keep an answer) ahead of the change.
- Copy every record, especially
MXandTXT, to the new provider. - Change the nameservers at the registrar.
- Keep the old records until the new ones are verified.
Then check your domain's nameservers again. Compare the SOA record across your nameservers: all authoritative servers must serve the same SOA. If the zone changes rapidly, serial numbers need only be loosely coherent, so a brief mismatch is not automatically an error.
Caches keep the old answer until the record's TTL expires. See which nameservers resolvers currently return.
References
- RFC 1034: Domain names - concepts and facilities, IETF, sections 2.4, 4.3.1
- RFC 2181: Clarifications to the DNS Specification, IETF, section 6
- Technical requirements for authoritative name servers, iana.org
- Nameservers · Cloudflare DNS docs, developers.cloudflare.com
- Multi-provider DNS and nameserver options · Cloudflare DNS docs, developers.cloudflare.com