Your IP: Unknown · Your Status: ProtectedUnprotectedUnknown

Skip to main content

Nameservers: What are they, and what are they used for?

If you manage a website, you’ve almost certainly come across the term “nameserver” before. But what does it mean? In this article, we will explore what a nameserver is, what it does, and how to control your nameserver settings to make your website easy to find.

Nameservers: What are they, and what are they used for?

Table of Contents

Table of Contents

What is a nameserver?

A nameserver is essentially a store of records for where websites are located on the internet. Nameservers exist to organize and correctly route traffic so that when you type the domain name of a website into your browser, it can quickly find what you’re looking for. Nameservers make it possible for you to find the webpage you’re looking for. That’s why they are so critical to the internet as a whole.

How do nameservers work?

Nameservers translate a domain name into an IP address. While it’s easier for humans to remember and recognize domain names like nordvpn.com, computers and servers work much better with numbers. An IP address is essentially a string of numbers that provides coordinates for the webpage you’re trying to find, and that’s what a DNS nameserver uses to correctly route your browser toward the webpage you need.

A nameserver can translate the domain name you type into your browser into an IP address, find the corresponding site, and return it to you in seconds or less.

Example of a nameserver configuration

When you first set up a website, you will usually be given a default nameserver to use by the Domain Registrar, a company that sells and manages domain names.

Here’s the format nameservers generally use:

Default nameserver example

  • ns1.example-registrar.com
  • ns2.example-registrar.com

Custom nameserver example

  • ns1.customhost.com
  • ns2.customhost.com

This setup allows you to point your nameservers at any domain you want or leave them pointing at the domain registrar’s default nameserver until you’re ready to resolve to your site.

Nameservers vs. DNS vs. DNS records

Nameservers and DNS records work together to help direct traffic across the internet, but they are not the same thing.

DNS stands for Domain Name System. The DNS is a distributed system of databases across the internet that stores a large number of DNS records.

DNS records are records of information linking a domain name to an IP address. Nameservers store and manage the DNS records for a domain and respond to DNS queries by looking up the domain name you type into the corresponding IP address.

One way to think about nameserver versus DNS is if DNS records were books, a DNS would be a library. The nameserver would be the librarian who knows exactly where to find the books you need.

That’s why it’s extremely important to keep your DNS records and nameserver settings up to date.

How to set up DNS records through nameservers

Setting up DNS records through nameservers is essential for correctly directing traffic to your website. Follow these steps to configure your DNS settings effectively.

1. Determine your nameservers

To start, you need to identify whether you’ll be using default nameservers provided by your domain registrar or custom nameservers provided by your web hosting service.

  • Default nameservers: These are provided by your domain registrar. They work well if you’re not hosting a website or if you’re using the registrar’s hosting services.
  • Custom nameservers: These are provided by your web hosting provider or a third-party DNS service. If you’ve built a website and want your domain to point to it, you’ll likely need to use custom nameservers to direct visitors to the right place.

2. Access your domain management interface

Once you’ve determined which nameservers you’ll be using, the next step is to access your domain management interface to configure your DNS settings.

For domain registrars (default nameservers):

  • Log in to your domain registrar’s account (e.g., Hostinger, GoDaddy, Namecheap).
  • Navigate to the “Domains” or “Domain management” section. Every domain registrar will have a slightly different layout, but most have help sections that can guide you to where you can change your settings.
  • Select the domain you want to manage and update the DNS records as needed.

For a web hosting provider (custom nameservers):

  • Log in to your web hosting control panel (e.g., cPanel, Plesk).
  • Look for the “DNS zone editor” or “Advanced DNS settings.”

Every domain registrar web hosting provider lays out its website a little differently. If you’re struggling to find your domain management interface, check out the Help section of your domain registrar or your web hosting provider if you’re using one.

Manage your DNS records

Once logged in to your domain management interface, you can manage your DNS records and control how people can access your website. Your domain management interface will display different types of DNS records in a drop-down menu, so you need to know what kind of DNS records you want to manage.

Types of DNS records to manage:

  • A record: Maps a domain name to an IPv4 address.
  • AAAA record: Maps a domain name to an IPv6 address (check out this article on understanding IPv4 and IPv6 differences).
  • CNAME record: Maps an alias domain name to a canonical domain name.
  • MX record: Directs email to mail servers.
  • TXT record: Holds arbitrary text data often used for verification.
  • NS record: Specifies nameservers for the domain, indicating where DNS queries should be directed.

Example DNS Record Management in cPanel:

A record

  • Name: example.com
  • Type: A
  • Value: 192.0.2.1
  • TTL: 3600 (Time to Live in seconds)

MX record

  • Name: example.com
  • Type: MX
  • Priority: 10
  • Value: mail.example.com

CNAME record

  • Name: www
  • Type: CNAME
  • Value: example.com

TXT record

  • Name: example.com
  • Type: TXT
  • Value: “v=spf1 include:example.com ~all”

4. Apply and save changes

  • Once you’ve made whatever changes you need to your DNS records, click the “Save” or “Apply” button.
  • Wait for the changes to take effect (this can take up to 48 hours).

5. Verify DNS changes

You can use online tools or your computer’s command line to check that your DNS changes have taken effect.

If you’re using the command line, choose the appropriate command for your computer:

  • Windows: nslookup example.com
  • Linux or macOS: dig example.com

DNS leak test

A DNS leak is a security flaw that happens when a user’s DNS requests move outside the usual encrypted tunnel and become visible to the user’s internet service provider (ISP). These leaks can reveal your IP address, approximate physical location, and browsing history.

A DNS leak can happen for several reasons, including an improperly configured VPN, an ISP that uses a transparent proxy to redirect web activity to their DNS servers, or a software bug.

Knowing when you have a DNS leak is key to your online safety. Use NordVPN’s free DNS leak tool to check for DNS leaks and keep your personal information private while using the internet.

Online security starts with a click.

Stay safe with the world’s leading VPN

FAQ