DNS & nameservers

Nameservers and DNS basics

How a domain becomes a working website or email address — explained without the jargon.

Owning a domain is one thing. Making it actually point to your website or email is another. That second step is what DNS is for, and the bridge between your domain and DNS is the nameserver field you see in every WHOIS lookup. Without working nameservers, a registered domain is just an entry in a database — nothing on the internet will know how to reach it.

What DNS is doing

DNS, the Domain Name System, is essentially the internet's phone book. When a browser wants to load example.com, it has to find out which IP address that name currently points to. It does that by asking a chain of servers: a recursive resolver (often run by your ISP, your router, or a service like 1.1.1.1), then the root nameservers, then the TLD's nameservers, and finally the authoritative nameservers for the specific domain. Each step caches its answer for a while, so subsequent lookups are nearly instant. The whole first-time process usually takes tens of milliseconds.

What a nameserver is

A nameserver is a server that holds the authoritative DNS records for one or more domains. When you set ns1.cloudflare.com and ns2.cloudflare.com as your domain's nameservers, you are telling the rest of the internet "if you want to know anything about this domain, ask those servers." Whoever runs those nameservers — your registrar, a third-party DNS provider, your hosting company — controls where the domain actually points. That is why nameservers are arguably the most consequential setting on a domain.

Domains are usually configured with at least two nameservers for redundancy, and best practice is for those nameservers to be on different networks so a single outage cannot make your domain unreachable.

Common DNS record types

  • A — maps a name to an IPv4 address.
  • AAAA — maps a name to an IPv6 address.
  • CNAME — points a name to another name (an alias). Cannot coexist with other records on the same name.
  • MX — tells mail servers where to deliver email for the domain.
  • TXT — stores arbitrary text, used for verification, SPF, DKIM, DMARC, and similar.
  • NS — declares which nameservers are authoritative for a zone or a delegated subdomain.
  • CAA — restricts which certificate authorities are allowed to issue HTTPS certificates for the domain.

How nameservers and registration interact

Your registrar's job is to tell the registry which nameservers belong to your domain. The registry publishes that mapping at the TLD level. Once that is done, anyone resolving your domain ends up at your nameservers, which then return the actual A, AAAA, MX, or CNAME records. If a WHOIS lookup shows the wrong nameservers, your domain will never resolve correctly no matter what you put in your DNS provider — the upstream pointer is wrong.

Related guides