There might not be much of a market for web developers today if it wasn't for the humble nameserver. This important cog in the DNS (domain name system) was a major leap towards a more user-friendly internet, where websites could be reached by URLs rather than long IP addresses. Almost 40 years later, DNS and nameservers still underpin everything we do online.
While nameservers aren’t something that many casual site owners have to concern themselves with, changing your nameservers can have a positive effect on both security and site performance.
Here’s everything you need to know about nameservers: what they are, how to find the nameservers for your domain, and why changing them can be beneficial.
What are nameservers?
In short, nameservers are part of the process of navigating to a domain. When a user types the URL of a website into their address bar, they’re directed to the nameservers for that domain.
The nameservers then tell the browser what the IP address is for the resource they’re trying to access. Broadly speaking there are two kinds of nameservers – root nameservers and domain nameservers – but domain nameservers are the kind most relevant to web developers.
In effect, the URL for a website is a sort of nickname, and the IP address is its real name. A nameserver is an intermediary that recognises the nickname you’ve entered and passes you on to the real deal.
Most websites will have two nameservers – the primary nameserver and the secondary nameserver. The second one exists purely for redundancy: if the first one is unavailable (due to being down or overloaded), the visitor’s DNS request is sent to the second.
To learn more about how DNS servers work, check out our guide on how to migrate a DNS server.
How do nameservers work?
A domain name server (also known as a DNS resolver) stores and organises DNS NS records, which contain the IP addresses needed to access different resources on a server. When you type in a URL, your browser contacts a server with information about all top-level domains with that extension (e.g. ‘.com’). Then, it sends you to the correct nameservers for that domain, which in turn sends you to the specific resource you’re looking for.
UK hosting expertise you can rely on.
Our UK-based support team are techie experts, and they’re ready to help you deliver for your clients.Why it's important to know your nameservers
Nameservers are a critical part of a website’s infrastructure, helping users and search engines navigate your website. Without them, your site won’t function. While nameservers aren’t something you often need to think about, they do come into play in a couple of circumstances: changing hosting providers, and adopting a security solution such as Cloudflare.
Nameservers are usually provided by your web host, meaning that whenever you change your hosting provider, you’ll need to update your nameservers with your domain registrar. In the case of a secure domain name system provider such as Cloudflare, using their nameservers allows you to route traffic through them for an extra layer of security against threats like denial of service (DDoS) attacks.
How to find the nameservers for your website
Finding the nameserver records for your domain is usually a simple process. However, this process can vary, depending on how and where your domain is registered.
1 Check your hosting provider
The first place to check for the nameserver records for your domain will usually be your hosting provider. These will be the nameservers you need to update your domain registrar with to link the domain to the host. The two nameservers will usually be visible in the control panel for your hosting platform, often in a bar on the right-hand side, although some hosting providers treat DNS queries differently.
Alternatively, the nameservers may be noted in the account settings or system settings for your account or domain. The specific location will vary depending on the hosting provider you use, but they will normally have a section in their FAQs or knowledge base instructing you where to find your nameserver information.
If you can’t find your authoritative nameserver, speak with your provider. They may have a different DNS lookup tool which is trickier to find.
2 Check your domain registrar
If you just want to see the nameservers your domain is currently using, you can check your registrar. Again, the location for this information will vary depending on the domain provider, but it can usually be found in the control panel under domain settings. It may be under an option such as ‘Manage DNS’, ‘DNS Settings’, or ‘DNS Record Types’, for example, alongside your zone file.
3 Use a WHOIS lookup tool
A useful way to check if your domain and web hosting are correctly linked can be to look up your nameservers with a WHOIS lookup tool. WHOIS provides publicly available information about a website, including its owner, where it was registered, when the given domain registration expires, and its nameservers – along with other detailed information.
Some of this information can be redacted by purchasing a domain privacy service from your registrar. If you haven’t done this, though, you should be able to find your DNS records here.
Services such as Domain Tools and Who.Is allow you to view your WHOIS records and check nameservers. Simply enter the URL or IP address of your website to view its WHOIS records, including the nameservers it’s currently using.
By comparing these with the nameservers from your hosting account, you can see if they have been set up correctly. There are more tools available, but these are the most reliable for this sort of query.
4 Use system console commands
Windows
- Type cmd into the start menu and open the Command Prompt
- Type the following into the Command Prompt (make sure the spaces and cases are identical): nslookup -type=ns yourdomainname.com
- Hit Enter. You should see two instances of “nameserver =” followed by the nameservers’ addresses.
Mac
- Press F4 to open Spotlight Search, then type Terminal and press Enter
- Type the following command into the Terminal (make sure the spaces and cases are identical): dig ns yourdomainname.com
- Hit Enter. You should see the nameservers next to ‘NS’ under the Answer Section.
Linux
- Press Ctrl + Alt + T to open the Terminal.
- Type the following command into the Terminal (make sure the spaces and cases are identical): dig ns yourdomainname.com
- Hit Enter. You should see the nameservers next to ‘NS’ under the Answer Section.
How to change nameservers
One of the primary reasons to locate your nameservers is as part of a hosting migration. When you change hosting providers, you’ll likely have to point your domain to the new nameservers they provide.
The only time this may not be true is if you use another DNS server provider such as Cloudflare, or if you are transferring to a host that is also your domain registrar, in which case they may be able to automate this process.
Changing nameservers is usually as simple as following the steps above to check your hosting provider and domain registrar. Once you’ve copied or noted down the nameservers from your hosting provider, you should locate the area in your domain registrar’s control panel or account settings that lists your domain nameservers.
From here, the process usually entails simply deleting the nameservers that are currently listed for your domain, and replacing them with the nameservers from your hosting provider. This should point the domain to the hosting provider, ensuring that anyone who types in your domain name is directed to the server containing your actual website.
Just bear in mind that DNS propagation won’t happen straight away. DNS propagation is the time that it takes to update DNS records. Changes don’t take effect immediately as name servers store domain record information in their cache for a certain period before refreshing. So, be patient – updates to the root nameserver records can take up to 72 hours.
Making a positive change
With your nameserver information in hand, you’re free to make a change to a new DNS – or a new hosting provider. With managed migrations and a UK-based support team ready to keep you updated throughout the process, moving to Nimbus couldn’t be easier.
Related: Understand what a primary URL is and how you can manage it