The multiple meanings of ’nameserver’ and ’DNS resolver’

By on 14 Mar 2022

Category: Tech matters

Tags: ,

1 Comment

Blog home

I’m currently working on a zine about the Domain Name System (DNS), so I’ve been thinking about DNS terminology a lot more than a normal person. In particular, two terms — nameserver and DNS resolver — which confusingly have different meanings depending on the context. I’m going to explain the different possible meanings in this post and how you can figure out which meaning is intended.

The two meanings of ‘nameserver’

There are two types of nameservers, and which one the term ‘nameserver’ refers to depends on the context.

Meaning 1: Authoritative nameservers

When you update DNS records for a domain, those records are stored on a server called an authoritative nameserver.

This is what nameserver means in the context of a specific domain. Here are a few examples of how it is used in this context:

  • Connect a domain you already own to Wix by changing its name servers.
  • Almost all domains rely on multiple nameservers to increase reliability; if one nameserver goes down or is unavailable, DNS queries can go to another one.
  • You can update the nameserver records yourself by following the steps your domain registrar may provide in the help content on their website.

Meaning 2: Recursive nameservers, also known as DNS resolvers

These servers cache DNS records. Your browser doesn’t make a request to an authoritative nameserver directly. Instead, it makes a request to a DNS resolver (aka recursive nameserver), which figures out what the right authoritative nameserver to talk to is, gets the record, and caches the result.

This is what nameserver means in the context of you browsing the Internet (your computer’s nameservers). Here are a few examples of how it is used in this context:

  • Changing nameservers can be a pain on some devices and require multiple clicks through a user interface. On Windows 10, for example…
  • Are your DNS nameservers impeding your Internet experience? NEW RELEASE adds nameservers 1.1.1.1, 1.0.0.1 and 9.9.9.9.
  • Configure your network settings to use the IP addresses 8.8.8.8 and 8.8.4.4 as your DNS servers.

I prefer to use the term ‘DNS resolver’ even though it has two meanings because it’s much more commonly used than ‘recursive nameserver’.

The meanings of DNS resolver

A DNS resolver can either be a library or a server. (I’m sorry, I know I said that a DNS resolver is a server earlier. But sometimes it’s a library.)

Meaning 1a: Stub resolver (library version)

A stub resolver is something (it can be either a library or a DNS server) that doesn’t know how to resolve DNS names itself; it’s just in charge of forwarding DNS queries to the ‘real’ DNS resolver. Let’s talk about stub resolvers that are libraries first.

For example, the getaddrinfo function from libc doesn’t know how to look up DNS records itself; it just knows to look in /etc/resolv.conf and forward the query to whatever DNS server(s) it finds there.

How to tell if this is what’s meant — if it’s part of your computer’s operating system and/or if it’s a library, it’s a stub resolver.

Here are a few examples of how DNS resolver is used in this context:

  • The resolver is a set of routines in the C library that provide access to the DNS. These are the DNS servers used to resolve web addresses. You can list up to three, and the resolver tries each of them, one by one, until it finds one that works.
  • If the command succeeds, you will receive the following message “Successfully flushed the DNS Resolver Cache.“

Meaning 1b: Stub resolver (server version)

Stub resolvers aren’t always libraries though. For example, systemd-resolved and dnsmasq are stub resolvers but they’re servers. Your router might be running dnsmasq.

This is also known as a DNS forwarder.

How to tell if this is what’s meant — if your router is running it or it’s part of your OS, it’s probably a stub resolver.

Meaning 2: Recursive nameserver (a server)

A recursive nameserver (like we talked about before) is a server that knows how to find the authoritative nameservers for a domain. This is the kind of DNS resolver I was talking about in my A toy DNS resolver post (though mine wasn’t a server).

How to tell if this is what’s meant — if it’s unbound, bind, 8.8.8.8, 1.1.1.1, or run by your ISP, then it’s a recursive nameserver.

Here are a few examples of how DNS resolver is used in this context:

  • The DNS resolver in pfSense® software utilizes unbound, which is a validating, recursive, caching DNS resolver.
  • We invite you to try Google Public DNS as your primary or secondary DNS resolver.
  • I work for a reasonably large mobile service provider and we are in the process of implementing our own DNS resolver.

The most popular DNS server words

I also did a quick unscientific survey of which terms to refer to DNS servers were the most common by counting Google results. Here’s what I found:

Search termNumber of Google results
dns server8,000,000
nameserver4,200,000
dns resolver933,000
public DNS server204,000
root nameserver42,000
recursive resolver38,500
stub resolver26,100
authoritative nameserver17,000
dns resolution service9,450
TLD nameserver7,500
dns recursor5,300
recursive nameserver5,060
Table 1 — Number of Google search results per term.

Basically what this tells me is that, by a pretty big margin, the most popular words used when talking about DNS servers are nameserver and DNS resolver.

The more specific terms like recursive nameserver, authoritative nameserver, and stub resolver are much less common.

I hope this helps some folk understand what these words mean! The terminology is a bit messier than I’d like, but it seems better to me to explain it than to use less ambiguous language that isn’t as commonly used in practice.

Adapted from original post which appeared on Julia Evans’ Blog.

Julia Evans is a software developer. She’s the creator of Wizard Zines, comics with short, clear, and fun explanations of complex technology.

Rate this article

The views expressed by the authors of this blog are their own and do not necessarily reflect the views of APNIC. Please note a Code of Conduct applies to this blog.

One Comment

  1. Matto

    For a stub resolver that is running on an end user device, the term ‘DNS client’ often seems to be widely used too.

    Reply

Leave a Reply

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

Top