What Is a Nameserver?
- By Douglas Moore
- Last Updated On May 7, 2022
If you’ve ever tried to build your own website, chances are you’ve come across the term nameserver. There are countless computer blogs and online guides that approach the subject a bit cryptically, using technical terminology that may not be accessible to those who are just starting out on their website-building journey. It can get confusing, so here’s a basic guide to what nameservers are and what purpose they serve.
When you type a search term into your browser and hit ‘enter’, you set in motion a lightning-fast process of communication and data retrieval. Nameservers are at the center of the action: a nameserver facilitated your access to this very web page, as well as any other browser search you’ve conducted today.
Nameservers are a crucial part of DNS (Domain Name System) software. DNS moves traffic smoothly around the internet, and nameservers play an integral role in this process: they translate between IP addresses and domain names. But what does that mean?
Namespaces
To really understand what nameservers do, we first have to understand what namespaces are. The internet has two principal namespaces: the domain name hierarchy and the IP address system.
Domain names are the part of web addresses that consists of a website name and the top-level domain (these are usually three letters, such as .com, .org, or .gov). For example, the domain name of this website is domainnamesanity.com. IP addresses, on the other hand, are long strings of numbers.
Every website has both a domain name and an IP address. But domain names, which are user-friendly for humans, are difficult for computers to understand. Similarly, IP addresses are impractical for humans to use but are readable by computers.
For internet traffic to flow – that is, for web browsers to connect with web servers – these two principal namespaces have to ‘talk’ to each other. DNS software solves this problem by acting as a translator between the two.
Nameservers vs. DNS
Although often confused or used interchangeably, DNS and nameservers are not technically the same thing. Rather, DNS software is made up of nameservers. They are an organizing tool, similar to a library catalog, that contains the DNS records connecting a domain name to an IP address.
Or, if library analogies aren’t your thing, you can think of a nameserver as an old-school phone book, with phone numbers categorized according to their corresponding owners’ names. Without nameservers to act as a directory, it would be nearly impossible to find what you’re looking for on the internet without knowing the IP address. Consider the number of websites you visit every day: could you keep track of that many IP numbers in your head? Probably not. Enter an incorrect IP address, and who knows where you’ll end up. Thankfully, nameservers are there to do the hard work for us.
When you type a domain name into a search bar or browser, your computer uses DNS to find out which nameservers it should contact. This turns up a list of nameservers, which look a bit like a cross between a domain name and an IP address.
Although there’s technically no limit to the number of nameservers a website can have, most websites have two: a primary, which does most of the work, and a secondary, which is there as a backup in case something goes wrong with the primary. When your computer contacts one, it translates the domain name you entered and finds its corresponding IP address. Once it has found the IP address in the nameserver, your browser will download the data and connect you to the corresponding website.
Why Do I Need to Know My Website’s Nameservers?
Strictly speaking, you don’t have to know your website’s nameservers. Your domain registrar (or the web hosting service you’ve chosen for your website) will generally set up a default name server, and you won’t have to worry about it. However, issues can arise if you’re trying to transfer your domain name to a different web host, or if you’ve registered your domain name separately from your current hosting company. Then you’ll need to know your nameservers in order to change your web host. Here’s a helpful resource if you need to find the host of a website.
Where Can I Find My Website’s Nameservers?
There are a few different ways to find your website’s nameservers. Online resources such as https://dnsresults.com/ allow you to easily enter a domain name and find the associated name servers. Just make sure you change the settings on the search tool to “DNS Check” mode. A similar search can also be performed locally, although it works differently on Windows and Mac.
For Mac or Linux, go to the Terminal and type in “dig domainname.com” (using the domain name of the website whose nameserver you’re searching for, of course). This command will turn up the nameservers of the website you’ve entered.
For Windows, first go to PowerShell. Then, type in “nslookup” and hit ‘enter’. Type in “set q=ns”, hit ‘enter’ again, and type in the domain name you want to find the nameservers for. Hit ‘enter’ again, and you should see all the nameservers for the domain name you entered.
Customizing Your Nameserver
It’s also possible to customize your nameserver. These are called vanity nameservers, and they’re a good option if you’re trying to establish a more professional look for your clients. Customizing your nameserver means that you don’t have to ask your clients to point their domain to another company’s nameserver, and thus is a popular option for resellers and hosting providers.
With a vanity nameserver, you’re not technically creating a new nameserver, but rather concealing the name of the public nameserver your domain name is pointed towards. To put it simply, vanity nameservers allow you to create nameservers based on your domain name, while still using the IP address of your web host’s nameservers.
Of course, in order to customize your nameservers, you’ll first need to have a registered domain name from a reputable registrar.
Long Story Short
Nameservers are a fundamental part of how DNS works. They facilitate the translation between domain names and IP addresses by acting as a sort of reference book. When you type a web address into a browser and hit enter, your request hits a nameserver, which matches the domain name to the correct IP address and allows your computer to understand what you’re looking for.
Most websites have two nameservers, a primary and a secondary, but there’s no limit to how many a website could theoretically have. While it’s unnecessary for most people to know their website’s nameservers, there are a few situations in which you’d need to be able to find them. For example, if you’ve registered your domain name separately from the company hosting your website or if you’ve decided to change to a different web host but want to keep your domain name.
You might also need to know your nameservers if you want to customize them, but this is mostly for hosting providers or resellers who are trying to present a more professional image for their clients.
You can find your website’s nameservers by using an online tool. They can also be found locally, although how this can be done depends on what system your computer uses.