Skip to content
hostcomplex

What Are Nameservers?

Maarten Soetens 3 min read

What a nameserver is

What are nameservers? They are the servers that hold a domain's DNS records and answer questions about that domain. When someone looks up a name under your domain, the nameservers your domain points to supply the answer.

Nameservers are usually identified by hostnames such as ns1.examplehost.net and ns2.examplehost.net. These look like ordinary domain names because each one is itself a name in DNS. Most domains use at least two nameservers, so that if one fails or becomes unreachable, the other can still answer. Some hosts give their customers branded nameserver names, which are covered in custom nameservers and glue records.

Why a domain points to a host's nameservers

When you register a domain, the registrar records which nameservers it should use. The registry for that top-level domain then publishes NS records that delegate the domain to those servers, so every lookup for the domain is directed to them. This is the link between a domain and its records. The mechanics are explained in what an NS record is.

Many people keep the default nameservers from their registrar and add their records there. Others point the domain to the nameservers of their web host, so that DNS records can be managed in the host's control panel. In both cases, the nameservers decide who controls the records.

What changing nameservers involves

Changing nameservers moves control of every record for the domain to a different provider. Website, email and verification records all come from the new nameservers once the change takes effect. If the new provider does not contain the same records, services can stop working even though the old provider still has them.

The change is also not instant. The top-level domain servers keep the old delegation until its TTL expires, and resolvers keep it for the same period, so different visitors may see the old or new nameservers for a while. For that reason, a nameserver change is usually planned in advance, with the records prepared at the new provider before the switch.

Example: moving a domain to a new host

A freelancer buys a domain and keeps the registrar's default nameservers. Later she moves her site to a new host that asks her to point the domain to its nameservers. Before making the change, she copies every record from the old DNS zone, including the website address, the mail records and a verification record for an online service. Only after the new nameservers hold a complete copy does she switch them at the registrar.

Frequently asked questions

Do I need to change my nameservers to use a new web host?

Not always. You can keep your domain's nameservers at the registrar and edit the records there to point the website to the new host's address. You only need to change nameservers when you want the new provider to manage all of the domain's DNS records.

What happens if a domain's nameservers are wrong?

If the nameservers published for a domain do not lead to a working server that holds its zone, lookups for the domain fail. The website, email and other services stop resolving until the nameservers are corrected. This is why changes to nameservers should be planned carefully and checked before they go live.

  • Two-Factor Authentication

    Two factor authentication hosting adds a second check to control panel, domain and CMS logins. Learn which methods are strongest and why 2FA helps.

  • What Is an A Record?

    What is an A record? Learn how this DNS record maps a hostname to an IPv4 address, why domains use several A records and the root and www pattern.

  • Billing and Automation Platforms

    What is WHMCS? Learn how this commercial billing and automation platform helps hosts sell plans, collect payments and create accounts automatically.