What Are DNS Name Servers?
Author: Domeny.ForSale editorial team Published
In brief: DNS name servers provide information about a domain, including the address of its website server and the servers handling its email. In a domain registrar’s control panel, “name servers” usually means authoritative servers: those that hold the domain’s actual DNS configuration. They do not store the website itself — they indicate where the services associated with the domain are located.
How name servers help open a website
DNS, or the Domain Name System, lets you find technical information associated with a readable name such as example.com. One of its tasks is to determine the IP address — the network address needed to connect to a server. DNS also handles information related to email, domain verification and other services.
When you enter a website address in your browser, your device usually uses an intermediary server called a recursive resolver. This may be provided by your internet service provider, your company or a public DNS provider. The resolver looks for an answer in its cache and, if it cannot find one, queries the appropriate DNS servers.
In simplified terms, the search for an answer works like this:
- DNS root servers point to the servers responsible for the domain extension, such as
.com. - The servers for that extension point to the name servers serving the specific domain.
- An authoritative name server returns the required record, such as the IP address of the web server.
- The browser uses the information it receives to establish a connection.
Not every visit to a website requires this entire process. Cached answers allow some queries to be skipped.
Name servers, DNS records and hosting are different things
An authoritative server answers based on the configuration of the domain for which it is responsible. This set of entries is called a DNS zone, and the individual entries are DNS records. The names of the servers serving a domain often look like ns1.example.net and ns2.example.net.
Hosting, by contrast, is a service that provides the resources needed to run a website, such as storage for files and a database. A registrar enables you to register and renew a domain. One company may provide all these services, but the domain, DNS, website and email can just as easily be handled by four different providers.
The most common records have the following purposes:
| Record | What it does |
|---|---|
| A / AAAA | Specifies the IPv4 / IPv6 address assigned to a name. |
| CNAME | Creates an alias, directing one name to another. |
| MX | Specifies the servers that receive email for the domain. |
| TXT | Stores text, including information for domain verification and email authentication. |
| NS | Specifies the authoritative name servers for the zone. |
Changing name servers does not move website files or mailboxes. It changes the place from which the DNS configuration will be retrieved. If the new configuration is incomplete, some services may stop working even if your hosting is paid for.
When to change name servers and when to change only a record
If you are moving a website to another hosting provider, changing the records specified by the new provider, such as A, AAAA or CNAME, is often enough. You do not need to move all DNS management in that case. Email records can remain unchanged as long as email continues to be handled by the existing provider.
Changing name servers makes sense when you want another provider to manage the entire DNS zone. This could be a separate DNS service or a platform whose chosen configuration method requires such a change. Check the requirements in the current documentation for the specific service.
Example: your domain is registered with registrar A, your website is hosted by provider B, and your email is handled by provider C. You are moving only the website to hosting provider D. If your current DNS service lets you edit the necessary records, you can change where the website points without touching the name servers or email records. This limits the scope of the changes and the risk of overlooking the configuration of other services.
How to change DNS name servers safely
Name servers are usually changed in the domain registrar’s control panel, under delegation settings. Delegation specifies which servers are responsible for the domain’s DNS. Simply adding NS records to the existing zone generally does not replace changing the delegation at the registrar.
Before switching, follow this short procedure:
- Save the current configuration. Include the website, subdomains, email, verification records and email authentication.
- Create the zone with the new provider. Copy the necessary records and check that the addresses and names are correct. An automatic import may not detect everything.
- Check DNSSEC. This is a mechanism for verifying the authenticity of DNS responses. If it is active, follow the providers’ migration procedure; a mismatched DS record in the parent zone may cause DNSSEC-validating resolvers to reject responses.
- Enter the exact names of the new servers in the registrar’s control panel, following the DNS provider’s instructions.
- Keep the old DNS service active during the transition and test the website, subdomains, and sending and receiving email.
When the change will become visible and how to check it
DNS responses are cached for a period known as TTL. Different devices and resolvers may therefore use different versions of the configuration for a while. When changing name servers, cached delegation data also matters, not just the TTL of the website’s records.
There is no single guaranteed time frame that applies to every DNS change. Lowering the TTL sufficiently in advance may help when changing records, but it does not remove responses already cached or automatically speed up the entire delegation change. Check the estimated time frame and migration conditions with your registrar and DNS provider.
To check the specified servers, you can use the command dig NS example.com or nslookup -type=NS example.com. A result from a single resolver does not yet confirm that all caches have been refreshed. Before making a change, first establish where the active DNS zone is located — that is where you need to edit records for the changes to affect how the domain works.
