Anybody with a web hosting account has come across the term nameserver, but unfortunately, nobody seems to be in a rush to explain what it means.
In this guide, you’ll learn what nameservers are, how they work, and why you might want to get a private one!
Here’s everything you need to know about nameservers:
- What is a nameserver?
- How do nameservers work?
- What’s the difference between the DNS and nameservers?
- What are the main functions of the DNS?
- What are private nameservers?
- What’s so great about private servers?
- What’s DNS propagation?
- How does the DNS work forward and backward?
1. What is a nameserver?
To fully understand what a nameserver is, we have to talk a little bit about IP addresses.
Every website has an IP address, which looks something like “11.22.318.104.22.168.”
IP addresses are easy for computers to look up, but it would be a nightmare if we had to know the IP address of every single website we wanted to visit. Instead, we remember websites by their domain name. A website with the IP address “11.22.322.214.171.124.” might have the domain name “www.catswithbaseballbats.com.”
This is where name servers come in.
Nameservers are part of DNS, which stands for “Domain Name System.” The DNS is a database that acts kind of like a phone book for websites: It lists each website’s domain along with its IP address.
When you type a website’s domain into your browser, the nameserver gives your browser the website’s IP address so the website can be loaded onto your computer.
A nameserver is any server that has DNS software installed on it, so it can use the domain name that you type into your browser to find the website with the corresponding IP address.
If you have a website, your nameserver is what sends users to your website when they type in your domain name.
2. How do nameservers work?
A website is a set of files and databases that are hosted on a server. When you want to visit a website, you’ll need to access the files on the server. A nameserver directs you to a website stored at a particular IP address on a server when you type a website’s domain name into your browser.
The process looks something like this:
- You type “www.catswithbaseballbats.com” into your browser.
- Your browser uses the DNS to find the nameservers for www.catswithbaseballbats.com.
- The nameservers ns1.catswithbaseballbats.com and ns2.catswithbaseballbats.com are retrieved as the nameservers for the domain.
- Your browser uses the nameservers to look up the IP address for www.catswithbaseballbats.com.
- Your browser gets the response “11.22.3126.96.36.199.”
- Your browser sends a request to “11.22.3188.8.131.52.”, including the specific page you’re trying to reach on the website.
- The server hosting the website sends the page to your browser.
- You see the website loaded into your browser.
3. What’s the difference between DNS and nameservers?
In practice, the terms “DNS” and “nameserver” are usually used interchangeably, but if you want to get technical, the DNS is the database that lists the specific nameservers that store a particular website. The nameserver then provides the IP address for a specific website.
4. What are the main functions of the DNS?
The DNS acts as a record of the names of websites and their corresponding IP addresses. One great thing about the DNS is that it can quickly be updated. That’s why you can change your website’s location without affecting your visitors too much.
5. What are private nameservers?
When you register a domain, your domain registrar will give you default nameservers. You’re free to use these, of course, but you can also create your own custom nameservers, which are called “private nameservers”.
For example, if you have the domain name www.catswithbaseballbats.com, and you want to create custom private nameservers, you could log in to your domain registration control panel and register the private nameservers “ns1.catswithbaseballbats.com” and “ns2.catswithbaseballbats.com”.
6. What’s so great about private nameservers?
Sure, it’s interesting to have private nameservers, but why would anyone take the extra time to create them?
It turns out that there are actually many benefits to having private nameservers, like the kind that you usually get with VPS hosting and dedicated hosting.
Here are three of the biggest benefits:
- Private nameservers mean that your website won’t suffer in search rankings because you share a nameserver with a website that’s dragging you down.
- If you resell web hosting, private nameservers hide the fact that you’re really reselling web hosting that you bought from another company, and they also make it possible for you to switch web hosts without affecting your users’ nameservers.
- Private nameservers make it easy for your clients to remember your server if you make them the same as your domain.
These are all excellent reasons to choose private nameservers.
7. What’s DNS propagation?
Most of the time, you won’t need to know anything about your nameservers. But if your domain name is registered with one company and hosted with a different one, you’ll need to set your nameservers for your domain to point traffic to your web hosting account.
When you change your name server, it usually takes 3-10 hours to take effect, but sometimes it can take up to 48 hours.
This delay is called “DNS propagation”, and it happens because it takes time for each DNS server to update other servers around the world.
8. How does the DNS work forward and backward?
Most of the time, the DNS is used to find the IP addresses that correspond to a certain domain name. This is called a “forward DNS lookup”.
But the DNS can also be used to find the domain name that’s connected to a particular IP address. This is called a “reverse DNS lookup.” This is a far less common use of the DNS, but it’s very useful for helping network administrators with troubleshooting.
Nameservers are a crucial part of the DNS, and they’re the reason visitors can access your website without needing to memorise your website’s IP address. As a website manager, it helps to know as much about nameservers as you can, in case you want to create private nameservers for branding purposes, or if you want to host your website with a different company than the one from which you purchased your domain.
You don’t need an encyclopaedic knowledge of nameservers and all the technical terms you’re bound to run into when you’re managing your website, but the more you know, the easier and more rewarding you’ll find it to operate your website. Now that you know all about them and how they can boost your branding, check out our article on securing your domain name