What is a nameserver?

A nameserver is a server that answers DNS queries. In everyday use the word means the authoritative servers that host a domain's DNS records, such as ns1.dns-host.example.

When you register a domain you tell the registrar which nameservers are responsible for it. The registry publishes those names as NS records in the TLD zone, and from then on resolvers looking for anything under your domain are referred to those servers. The nameservers hold the actual records: A, MX, TXT and the rest.

Nameservers are often run by the registrar, by a hosting company, or by a specialised DNS or CDN provider, and they do not have to belong to the company where the domain is registered. Looking at a domain's nameservers is therefore a quick way to see who operates its DNS.

Changing nameservers moves the whole zone to another provider. Before switching, recreate every record at the new provider; otherwise mail and subdomains that existed only in the old zone stop working once resolvers follow the new delegation.

Example

ns1.dns-host.example.  →  198.51.100.53
ns2.dns-host.example.  →  203.0.113.53

Check it

See how Nameserver looks for a real domain:

NS lookup