CheckNet.

Name servers (NS): why at least two

If your only name server fails, your whole site and email go down with it.

Check it with CheckNet: DNS

What is a name server?

Name servers (NS records) are the servers that answer the question “what is the IP address of example.com, and where does its mail go?”. Every time someone opens your site or emails you, their device asks these servers first. You set the list at your domain registrar, and it usually also appears as NS records inside the DNS zone itself.

Why at least two?

If your domain has a single name server and that server goes down, loses its network or comes under attack, nobody can turn your domain name into an address: the site does not open, email does not arrive, and every other service on the domain stops too, even if the web server itself is fine. The DNS standard has asked from the start (RFC 1034) for every zone to be served by at least two name servers. Ideally they sit on separate networks or locations, so one failure does not take both down.

Fix your name servers

  1. Find out who hosts your domain’s DNS: your registrar, a DNS service such as Cloudflare, or your own server.
  2. In that service’s panel, find the list of name servers it assigned to your domain. DNS services almost always give two or more; take all of them, not just the first.
  3. In your registrar’s panel, open the name server settings and enter all of those names; see the example below.
  4. If you run your own name server, set up a second one (or a secondary DNS service) that copies the zone from the first, and add its name at the registrar too.
  5. A name server change can take up to a day or two to be seen everywhere; do not delete the old records in the meantime.
example.com.  NS  ns1.example-dns.com.
example.com.  NS  ns2.example-dns.net.

Common problems

  • Only one entered: sometimes only the first name server makes it into the registrar’s panel. Add every name the DNS service gave you.
  • Two names, one machine: two different names that point to the same server are really one server. Each should be a separate machine.
  • The two lists disagree: the list at the registrar and the NS records inside the zone should match. If one of the servers no longer answers for your domain, remove it from both places.
  • A name server inside the domain: if the server’s name is under the domain itself (like ns1.example.com), the registrar also needs its IP address as a glue record, or nobody can find it.

Two DNS services from two different companies give the most resilience, but then every change has to be made in both, or one has to act as a secondary of the other. For most sites, the multiple servers of one solid DNS service are enough.

Check it with CheckNet

Enter the domain on CheckNet’s DNS page. The “name servers” row shows how many there are: two or more is fine, one is a warning, and zero means the domain does not resolve at all. You can see their names in the records table and in the registration section.