India English
Kenya English
United Kingdom English
South Africa English
Nigeria English
United States English
United States Español
Indonesia English
Bangladesh English
Egypt العربية
Tanzania English
Ethiopia English
Uganda English
Congo - Kinshasa English
Ghana English
Côte d’Ivoire English
Zambia English
Cameroon English
Rwanda English
Germany Deutsch
France Français
Spain Català
Spain Español
Italy Italiano
Russia Русский
Japan English
Brazil Português
Brazil Português
Mexico Español
Philippines English
Pakistan English
Türkiye Türkçe
Vietnam English
Thailand English
South Korea English
Australia English
China 中文
Canada English
Canada Français
Somalia English
Netherlands Nederlands

What Are Nameservers?

Nameservers connect your domain name to the correct website server and help direct your email. They use DNS records to tell browsers and other services where to find your domain.

Your hosting or DNS provider gives you nameserver addresses, such as ns1.example.com and ns2.example.com. You enter these in your domain registrar’s settings to connect your domain to the provider managing its DNS.

This guide explains how nameservers work, their types, why they count, and what to check before changing them.

Types of nameservers and the DNS hierarchy

Nameservers have two main roles: recursive resolvers look up DNS information, while authoritative nameservers store a domain’s official DNS records.

TypeWhat it does
Recursive resolverFinds DNS answers and caches them for future requests. Usually provided by your ISP or a public service like Google DNS.
Authoritative nameserverStores a domain’s official DNS records. Your hosting or DNS provider usually manages it.

Primary and secondary nameservers

what are nameservers
  • Primary nameserver: Stores the main copy of a domain’s DNS records.
  • Secondary nameserver: Keeps a copy of those records to provide backup and reliability.

Both can answer DNS queries authoritatively.

The three levels of the DNS hierarchy

i) Root nameservers: Direct resolvers to the correct top-level domain (TLD) servers.

ii) TLD nameservers: Handle extensions such as .com, .org, and .ke. They point resolvers to a domain’s authoritative nameservers.

iii) Authoritative nameservers: Store the actual DNS records, including the IP address that directs visitors to a website.

    These levels work through DNS delegation, where each level points to the next. Resolvers follow these links to find the information needed to connect a domain to its website or other service.

    Nameservers vs. DNS vs. DNS Records

    These terms are related but have different meanings:

    • DNS (Domain Name System): The system that connects domain names to IP addresses and other information.
    • Nameservers: Servers that store and provide DNS information for domains.
    • DNS records: Individual entries that tell DNS how to handle website traffic, email, and other services.

    Common DNS records

    RecordPurposeExample
    APoints a domain to an IPv4 address192.0.2.1
    AAAAPoints a domain to an IPv6 address2001:db8::1
    CNAMEMakes one domain name an alias of anotherwww → example.com
    MXSpecifies the servers that receive emailmail.example.com
    TXTStores verification and email security informationSPF or domain verification text
    NSIdentifies the authoritative nameservers for a domainns1.example.com

    Where nameserver settings fit

    Nameserver information exists in two places:

    • At the registrar: You set which nameservers manage your domain.
    • In the DNS zone: NS records identify the authoritative nameservers, while other records control website addresses, email, and verification.

    Changing nameservers transfers DNS management to another provider. Changing an individual DNS record only updates a specific setting without moving the entire zone.

    what are nameservers

    How nameservers work

    When you type a domain name like www.example.com into your browser, DNS finds the IP address needed to reach the website.

    i) Your browser checks its cache. If the address is already stored, it uses it. Otherwise, your device asks a recursive resolver.

    ii) The resolver checks its cache. If it has a recent answer, it returns it immediately.

    iii) The root nameserver directs the resolver to the correct TLD server, such as .com.

    iv) The TLD nameserver provides the authoritative nameservers for the domain.

    v) The authoritative nameserver returns the domain’s IP address from its DNS records.

    vi) Your browser connects to the website using that IP address. The resolver also caches the answer for future requests.

      Nameservers do not store website pages. They help your browser find the server hosting the website.

      Why DNS caching counts

      DNS records have a time-to-live (TTL), which tells resolvers how long to cache an answer.

      Caching speeds up lookups and reduces repeated queries. However, after a DNS change, some resolvers may continue using the old information until their cached answers expire. This delay is commonly called DNS propagation.

      Why nameservers are important

      Nameservers help visitors reach your website and ensure your email and other domain services work correctly. Here are seven reasons they count.

      1) They connect your domain to your website

      Nameservers provide the DNS records that direct visitors to your website’s server. Without working nameservers, your domain may fail to load even when your website server is running.

      2) They direct website traffic and email

      Nameservers manage records that control how your domain works:

      • A and AAAA records: Point your domain to an IP address.
      • MX records: Direct incoming email to the correct mail servers.
      • TXT records: Verify domain ownership and support email security through SPF, DKIM, and DMARC.

      Incorrect records can disrupt your website or prevent emails from reaching their destination.

      3) They connect your domain to your hosting provider

      Changing your nameservers lets another provider manage your domain’s DNS records. Alternatively, you can keep your current nameservers and update individual records to point your domain to a new hosting server.

      4) They help keep your domain accessible

      If all authoritative nameservers become unavailable, visitors may eventually fail to reach your website. Using at least two reliable nameservers on separate networks helps reduce this risk.

      5) They support website and email reliability

      Incorrect settings or missing DNS records can interrupt your website and email services. Before changing nameservers, copy all existing records to the new provider and check that website, email, and verification settings are in place.

      6) They help protect your domain

      DNSSEC helps resolvers detect forged DNS responses. Securing your registrar account is equally important because anyone who gains access could change your nameservers and redirect your traffic.

      Protect your domain by enabling two-factor authentication, using a registrar lock, and keeping your account details secure.

      7) They can improve DNS response times

      Resolvers cache DNS answers to avoid repeating the same lookup. A reliable DNS provider can also help queries resolve quickly when cached answers are unavailable. However, changing nameservers alone will not necessarily make your website load faster.

      Nameservers keep your domain connected to the right services

      Your domain is just a name until its nameservers connect it to a website, a mailbox, and every other service you rely on. That is why switching them is a bigger decision than editing one record: you are handing control of the whole zone to someone else. Get it right, and nobody notices. Get it wrong, and your site and email can vanish together.

      Four habits keep a domain safe: use reliable providers, run at least two nameservers, copy every record before you switch, and lock down the registrar account that controls the setting.

      Check yours today. Run dig NS yourdomain.com +short to see the nameservers the internet currently uses for your domain. Compare them with the ones saved at your registrar and the ones at your DNS provider. If all three match, you’re set. If they don’t, fix the mismatch now, before it shows up as a lost website or missing email.

      Ready to put this into practice? Truehost lets you register a domain, manage its nameservers and DNS records, and add web hosting and business email from one dashboard, so your domain, website and mailbox stay in step. If you already own a domain elsewhere, you can point it to Truehost hosting by updating its nameservers at your current registrar. Check your hosting plan for the exact nameserver hostnames to use, and copy your existing DNS records first.

      Nameservers FAQs

      Are nameservers and DNS the same thing?

      Does every domain have nameservers?

      Can I use more than one DNS provider?

      Do nameservers affect SEO or site speed?

      What’s the difference between a nameserver and a web host?

      How many nameservers do I need?

      What happens if your nameservers are incorrect?

      Can you change nameservers without transferring your domain?

      Author

      Leave a comment

      Your email address will not be published. Required fields are marked *