Read this article in: Portuguese (Português) · Spanish (Español)
Changing a domain’s DNS is the process of redirecting your internet traffic by replacing authoritative name servers so that your domain points to new services or IP addresses. Essentially, the Domain Name System (DNS) acts as the internet’s “phone book,” translating human-friendly names (like www.yourcompany.com) into numerical addresses (IPs) that computers actually use. When you make this change, you are determining which servers are responsible for answering queries about your name, ensuring that users find the correct location, whether it’s a new hosting server or a new service provider. This procedure is essential for any administrator who wishes to migrate, change providers, or optimize the performance of their online presence.
The relevance of DNS to the global internet infrastructure is unquestionable. This service did not arise by chance; it was conceived with a hierarchical and distributed architecture, developed to avoid reliance on a single centralized database. DNS has been an essential component of Internet functionality since 1985, and its complexity is reflected in the variety of records it stores—such as A records (for IPs) and MX records (for email exchange). The ability to delegate the responsibility of subdomains to different servers is what ensures the system’s robustness and fault tolerance on a global scale.
Throughout this guide, you will be taken on a complete journey, from the most basic concepts to advanced security practices. We will begin by understanding the DNS architecture and the delegation mechanism, before detailing the necessary prerequisites to start the change. Next, we will present a rigorous step-by-step process for changing the name servers, followed by verification and propagation techniques to ensure the transition was successful. Finally, we will address common problems and best security practices to protect your domain and its records.
Key Points
- DNS functions like a phone book, translating domain names into IP addresses for machines.
- The DNS structure is hierarchical, using the concept of delegation to divide authority.
- Crucial records (A, MX, NS, CNAME) define the function and destination of each domain.
- DNS changes are not instantaneous; propagation depends on the defined Time To Live (TTL).
- Migration requires coordination between the Registrar (authority) and the Hosting Provider (data).
Understanding DNS Architecture and Delegation

To understand how the internet works, it is essential to understand the Domain Name System, or DNS. In essence, DNS acts as the internet’s “phonebook.” Its primary function is to translate human-readable domain names—such as www.example.com —into IP addresses (Internet Protocol) that machines understand, such as 93.184.216.34 (IPv4) or 2606:2800:220:1:248:1893:25c8:1946 (IPv6). Furthermore, the digital world also presents fascinating complexities, such as online games; if you enjoy competition, check out our 2024 MOBA Game Guide. This resolution process is transparent and fast, allowing online services to change location without the end-user having to worry about the address change.
The DNS architecture is based on a tree structure, where the namespace is organized hierarchically, starting from the root zone. This structure allows administrative responsibility to be divided. Each subdomain is, in a sense, an administrative autonomous zone. The concept of delegation is the central mechanism that allows this division. When a domain (the parent) delegates authority to a subdomain (the child), it does so by including an NS (Name Server) record in its own domain, pointing to the name servers responsible for the delegated domain. The parent domain, therefore, ceases to be authoritative for that part of the name, transferring management to the designated servers.
📘 Delegation
It is the central mechanism that allows the division of administrative authority. The parent domain transfers the management of a part of the name to the designated servers (children).
Records and Zone Management
Within this hierarchical structure, the information associated with a domain name is stored in Resource Records (RR). These records define what the domain does and where it points. The most common and crucial record types include:
- Record A: Maps a domain name to a specific IPv4 address. It is the fundamental record that makes a website accessible.
- MX Record (Mail Exchange): Indicates which mail servers are responsible for receiving mail from a domain, ensuring that emails reach the correct destination.
- NS Record (Name Server): Points to the authoritative name servers that manage the zone.
- CNAME Record (Canonical Name): It is an alias that allows one domain name to point to another domain name, simplifying subdomain management.
To ensure efficiency and reduce the query load on servers, DNS uses the caching mechanism. When a query is made, the result is accompanied by a Time To Live (TTL), which indicates how long that information remains valid. The authoritative server administrator defines this TTL, which can range from a few seconds to several weeks. It is important to note that, due to this distributed architecture and caching, changes to a DNS record are not instantaneous; they only propagate after the TTL expires across all intermediate resolvers.
Prerequisites and What You Need Before Starting
Before making any changes to a domain’s Name Servers (NS), it is essential that the administrator understands the dynamics of the naming infrastructure. The alteration process is not just a simple address pointer, but rather a reconfiguration of a distributed database system. For the change to be successful, you need to have three crucial elements on hand: the Domain Registrar (the entity that holds the legal registration of the name), the Hosting Provider (the server where the website is physically or logically running), and the IP addresses of the new name servers. See also: How to defeat Calus in Destiny 2.
These elements work together to ensure service integrity. The Registrar is the control point where the NS records are stored and managed. The Hosting Provider is who stores the actual data (the resource records, such as the A Record) that the world queries. Without knowledge of these two actors, the administrator cannot link the authority (the domain) to its location (the IPs).
Authority and Resolution: The Essential Difference
To avoid confusion, it is vital to distinguish between an authoritative server and a resolver (or cache server). The difference lies in the nature of the response that each provides.
An authoritative server is one that provides definitive answers; in other words, it is the primary and reliable source of information. It contains the original copies of all zone records. In a high-availability scenario, we have the primary server, which stores the original data, and secondary servers, which maintain identical copies through automatic update mechanisms. If you are changing the DNS, the IPs you provide must be the addresses of these authoritative servers.
In contrast, a resolver (or cache server) is an intermediary. Its function is to speed up the query process by temporarily storing (caching) the results of previous queries. If the resolver is not configured correctly, it can, in some cases, provide a “weak” response (known as lame delegation), because it does not have the authority to provide complete information.
What You Need Before You Start
Before accessing your registrar’s control panel, ensure you have the following data ready:
- The IP addresses of the new servers are: These are the IPs that point to the servers that actually manage the zone.
- The names of the name servers (e.g., ns1.yourdomain.com): Although the IP is crucial, the full server name is what will be registered in the DNS system.
- Administrative Access to the Registrar: You need the credentials to change the NS pointers in the control panel where the domain was purchased.
- Access to the Hosting Provider: This is necessary to ensure that resource records (A, CNAME, etc.) are correctly configured for the new IPs.
By having this information on hand, you ensure that the change is not just a registration act, but a complete and coordinated migration of your digital presence.
📊 Essential Difference: Authoritative Server vs. Resolver
| Server Type | Primary Function | Nature of Response |
|---|---|---|
| Authoritative | Provides definitive answers; it is the primary source. | Contains original copies of zone records. |
| Secondary (Authoritative) | Maintains identical copies through automatic updates. | Ensures high availability. |
| Resolver (Cache) | An intermediary that speeds up queries by temporarily storing results. | Can give a ‘weak’ response (lame delegation). |
Step-by-Step: Changing Name Servers

Changing the Name Servers (NS) is the act of delegating the management authority of a domain. When you migrate your infrastructure to a new hosting provider, for example, you are essentially telling the internet that the set of servers that previously managed your domain is no longer the definitive source. The process is not a simple “click and done”; it requires rigorous coordination between two crucial points: your hosting provider’s panel (where the domain is technically managed) and your registrar’s panel (where the domain was purchased). If the addresses are not absolutely correct, the name resolution mechanism will fail, and your visitors will encounter an error or an outdated site.
Configuration on Hosting Servers
Before changing any records in your registrar, you must ensure that the new name servers (the NSs) are ready to receive queries. These servers, which operate at the Application layer of the OSI model, are the guardians of your zone. This is where you configure the resource records (A, CNAME, etc.) to point to the correct IPs, before telling the world who these new guardians are. The sequence below details how you should prepare and register these new NSs with your hosting provider:
⚠️ Attention
NS changes are not instantaneous; the internet needs time for cache resolvers to update the records, and patience is essential.
- Identify the new NSs: Obtain the full names of the name servers (e.g., ns1.yourdomain.com and ns2.yourdomain.com ) provided by your new hosting.
- Access the management panel: Log in to your hosting provider’s administration area.
- Configure the zone records: Create or modify the resource records (such as the A Record, which maps the name to the IP) so that they point to the IP addresses used by the hosting.
- Verify integrity: Confirm that all essential records (including the NSs) have been saved and are active in the hosting’s DNS management system.
Pointing the domain at the registrar
With the hosting infrastructure ready to respond to queries, the next step is the most visible: changing the pointer. You need to go to the panel where the domain was registered and replace the old NSs with the new ones, a process that can be detailed in how to register a domain. This is the delegation of authority. It is at this point that the DNS system, which resolves human-readable names to machine-readable IP addresses, is instructed to use the new primary source of information.
- Access the registrar’s panel: Log in to the system where you purchased the domain name.
- Locate the NS section: Look for the DNS management or Name Servers area.
- Replace the pointers: Remove the old NSs and enter the full addresses of the new NSs provided by the hosting.
- Save and confirm: Confirm the change. This is the starting point for global propagation.
It is crucial to understand that after making the change at the registrar, the change is not instantaneous. The internet needs time for cache resolvers (the intermediaries that store information to speed up lookups) to update their records. The propagation process can vary, but patience is an essential tool for the domain administrator.
Verification and propagation: how to know if it worked
Changing the Name Servers (NS) and reconfiguring zone records, although concrete management actions, do not result in an instant change on the internet. The Domain Name System (DNS) operates in a distributed and highly efficient manner, and this efficiency is the core of the concept of propagation. Propagation is the period during which DNS servers around the world—the resolvers—must recognize and store the new addresses associated with your domain in their caches. To manage this time, we use TTL (Time To Live). TTL is a value set in each DNS record and indicates how long a local resolver must store (or “cache”) that record before being forced to make a new query. The longer the TTL, the longer the world may take to recognize the change, as resolvers will continue to use the old version of the record until it expires.
It is important to understand that when a user tries to access their domain, they are rarely interacting directly with the authoritative name server. Resolution is transparent. The process begins when an application, such as a browser, makes a request, sending it to the DNS resolver present in the local operating system. This resolver, which is often provided by your Internet Service Provider (ISP), first checks its own cache. If the answer is there, it returns it immediately. Otherwise, it forwards the query to one or more designated name servers, following a chain of delegation until it finds the correct result. The authoritative name server, upon responding, ensures that the resolver stores the data in cache for future use.
🧪 How DNS Resolution Works?
When you access a website, your browser asks the local resolver. If it doesn’t have the answer in its cache, it queries servers until it reaches the authoritative one. The latter ensures that the data is cached for future use.
How to check if DNS has been updated
To ensure the migration was successful, resolution tests must be performed. Command-line tools, such as dig or nslookup, are essential for verifying that the domain is responding with the correct IP addresses. Ping, for example, can be used to test connectivity with the IP addresses that should be associated with your domain. However, these tools only confirm connectivity; the dig tool allows for a deeper inspection, confirming whether the A record (which maps the name to the IP) is actually pointing to the addresses of your new hosting.
In addition to the standard resolution (name to IP), there is Reverse Lookup DNS, an advanced verification layer. While common DNS resolves a domain name to an IP address, Reverse DNS does the reverse: it looks up the domain name from a known IP address. This process is crucial for authenticity because it allows systems to verify whether a specific IP address actually belongs to the domain it claims to represent. For IPv4, this query uses PTR records and is structured in the in-addr.arpa TLD infrastructure. For example, the address 208.80.152.2 is represented in reverse order as 2.152.80.208.in-addr.arpa, which is the format the resolver queries to confirm the host’s identity.
Common Problems and How to Resolve DNS Failures

Despite all the technical rigor involved in changing name servers and configuring zone records, domain name resolution is not a foolproof process. In complex network environments, failures can arise not from human error, but from limitations inherent in the DNS architecture or from the misconduct of service providers. When a domain is inaccessible, the administrator must look beyond a simple record check, investigating deeper issues such as circular dependencies or the behavior of faulty resolvers.
Circular Dependencies and Glue Records
One of the subtlest challenges in DNS occurs during name delegation. Name servers are identified by names, not by IP addresses. This means that a resolver (the computer or software that seeks the address) must make an additional DNS request to discover the IP of the server to which it was sent. If the name provided in the delegation is a subdomain of the domain being delegated, a circular dependency is created.
To break this circularity, the delegating name server must provide one or more IP addresses for the mentioned authoritative name server. This information is known as “glue.” The glue record is a combination of the server’s name and its IP address. It is provided by the delegating name server in the additional section of the DNS response, complementing the delegation in the authority section. For example, if the authoritative server for example.org is ns1.example.org, a computer trying to resolve www.example.org would first need to resolve ns1.example.org. Since ns1 is part of example.org, the resolution becomes a cycle. The glue record, therefore, is the mechanism that allows the resolver to use one or more IPs to query the authoritative server and complete the search.
The Threat of Faulty Resolvers
Another common source of failure lies in the behavior of large Internet Service Providers (ISPs). Some of these providers configure their DNS servers in a way that violates established rules, such as ignoring Time-to-Live (TTL) or indicating that a domain name does not exist simply because one of their name servers did not respond.
Beyond external failures, the client system itself can introduce debugging difficulties. Applications like web browsers maintain an internal DNS cache to prevent repeated network lookups. While this is an optimized practice, this cache can obscure the data history during DNS troubleshooting because these caches typically use very short time-to-live values, around one minute.
To mitigate these failures, the solution begins with patience and rigorous checking. The propagation of NS and zone record changes is not instantaneous. After making the necessary changes, it is essential to monitor the status and perform resolution tests, including Reverse DNS, to ensure that the migration was successful and that all infrastructure components are responding correctly.
Best Practices and Advanced Security for Your Domain
Ensuring the availability and integrity of a domain goes beyond simply changing Name Servers (NS). For administrators seeking maximum robustness, implementing redundancy is an essential practice. Redundancy, in this context, means that the domain must be able to be successfully queried even if one or more name servers fail. When configuring multiple servers, the DNS system uses the concept of a Resource Record set (RRset). Although DNS resolvers return the complete set of records in a query, servers can be configured to implement round-robin ordering. This mechanism allows requests to be distributed among the different servers, optimizing load balancing and minimizing the risk of total downtime.
However, high availability is only half the battle; security is the most critical pillar. Historically, security concerns were not the main focus of DNS software, but the expansion of internet use into the commercial sector has drastically changed these requirements. The most notorious vulnerability is DNS cache poisoning. This attack occurs when false data is distributed to caching resolvers, masquerading as a legitimate authoritative server. The result is that the information database is polluted with potentially false data, often with long time-to-live values, redirecting legitimate requests to hosts operated with malicious intent.
How Advanced Security Protects Your Domain
To combat these threats, the DNS field has evolved to incorporate cryptographic mechanisms. DNSSEC (Domain Name System Security Extensions) is the most prominent solution. While traditional DNS responses do not have a cryptographic signature, DNSSEC modifies the protocol to add support for cryptographically signed responses. Unlike standard resolution, which deals with sets of records, DNSSEC operates on the complete set of resource records in canonical order, ensuring information authenticity. This prevents a resolver from being tricked by false data.
In addition to DNSSEC, there are other security tools that complement domain protection:
- Reverse Validation: Techniques such as forward-confirmed reverse DNS are used to help validate DNS results, adding a layer of advanced verification.
- Peer Authentication: Extensions such as TSIG (Transaction Signatures) are used to add support for cryptographic authentication between trusted parties, which is common when authorizing zone transfers or dynamic updates.
In summary, the security of a modern domain is not an optional feature, but an infrastructure requirement. The combination of redundancy (multiple NSs) to ensure resilience and the implementation of cryptographic mechanisms (DNSSEC) to ensure integrity is the best practice for protecting a domain name in today’s digital landscape.
Glossary
- DNS: A system that translates human-readable domain names into machine-understandable IP addresses.
- TTL (Time To Live): A value set in a DNS record that indicates how long a resolver should cache the information.
- Record A: The fundamental record that maps a domain name to a specific IPv4 address, making the website accessible.
- MX Record: Indicates which mail servers are responsible for receiving mail from a domain.
- NS (Name Server): Points to the authoritative name servers that manage a specific domain’s zone.
- Registrar: The entity that holds the legal registration of the domain name and where the NS pointers are managed.
Frequently Asked Questions
How long does it take for a DNS change to propagate globally?
Propagation is not immediate because the system operates in a distributed manner. The time required depends on the TTL (Time To Live) configured in each record. The higher the TTL, the longer intermediate resolvers will take to recognize the change.
What happens if I change the DNS and my website stops working?
If the new addresses are not absolutely correct, the name resolution mechanism will fail. This will cause visitors to encounter an error or be directed to an outdated site because the authority was not properly linked to the location.
What is the difference between a nameserver and a DNS resolver?
The authoritative server is the primary and reliable source, providing definitive answers and containing the original copies of the records. The resolver, or cache server, is an intermediary whose function is to speed up the query by temporarily storing the results.
Is it safe to change my domain’s DNS to a service like Cloudflare?
Security depends on the correct execution of the process. It is vital to ensure that you have the correct IP addresses and names of the nameservers before making the delegation. The change must be a coordinated migration between the registrar and the hosting provider.
What are MX records and why are they important for my email?
The MX (Mail Exchange) Record indicates which mail servers are responsible for receiving mail for a domain. It is crucial because it ensures that emails sent to your domain are routed and delivered to the correct destination server.
Conclusion
Domain Name System (DNS) management goes beyond simply changing an address; it is an act of reconfiguring a distributed database system. As we have seen, DNS acts as the internet’s phonebook, translating names into IP addresses, but its architecture is complex, based on delegation and hierarchy. For the infrastructure migration to be successful, it is imperative to understand the distinction between the authoritative server—the definitive source of information—and the resolver, which only speeds up the query through caching. The success of the change, therefore, depends on the rigorous coordination between the Registrar, where the domain is legally registered, and the Hosting Provider, which stores the registration records (such as the A Record).
The process is not instantaneous, and the notion of “immediate change” is a myth due to the caching mechanism and Time To Live (TTL). When you delegate the authority of a domain, you are informing the internet which set of servers is the guardian of your zone. Therefore, before any change, ensure that you have the IP addresses and the full names of the new nameservers (NS), as well as administrative access to both control panels. Only with this triad of data—IP, name, and access—does the migration become a complete and coordinated operation, minimizing the risk of name resolution failure.
Mastering DNS means mastering your digital presence. By recognizing the complexity of this distributed infrastructure, the administrator moves beyond being just a user and becomes a strategic manager. The true test of expertise is not in the click, but in the precision and planning that precedes the change. Therefore, before altering any pointer, take time to test and validate every address and record in your development environment.




