Managing Multiple DNS Records on One Domain with Different DNS Servers (Cloudflare as an Example)

Abstract: Delegate subdomains using NS records to manage different DNS providers for specific parts of a single domain.

Created: 2026-08-14 by

You cannot use different DNS servers for individual records within a single domain because the Domain Name System (DNS) relies on a hierarchical delegation model. Each domain must point to one specific set of authoritative nameservers at the registrar level, which then handle all queries for that zone. To manage records across different providers, you must delegate subdomains or use secondary DNS services.

The Hierarchy of DNS Delegation

The core misunderstanding often stems from how DNS resolution works. When you register a domain like example.com, your registrar assigns it a set of "authoritative nameservers." These are the only servers that the internet trusts to provide accurate information for that entire domain space. If you try to specify that a.example.com should be resolved by Server A and b.example.com by Server B using standard top-level records, the system will reject this configuration. The authoritative server for example.com is responsible for answering *all* queries related to that domain, including any subdomains unless explicitly told otherwise. This structure ensures consistency and prevents routing conflicts. If multiple sources claimed authority over the same domain without clear delegation rules, browsers would receive conflicting IP addresses, leading to widespread connectivity failures. Therefore, the first step in managing complex DNS needs is understanding that your primary domain name is tied to one provider's infrastructure.

Delegating Subdomains to Different Providers

If you need different parts of your domain managed by different services, such as hosting your main site on Cloudflare but your mail server on another provider, you must use delegation. This involves creating a specific record type known as an NS (Name Server) record within your primary zone. For example, if you want mail.example.com to be managed by a different DNS provider, you would log into your primary DNS provider's dashboard (e.g., Cloudflare). You would then add an NS record for the mail subdomain pointing to the nameservers provided by your secondary host.
  • Create an NS Record: In your primary DNS zone file, add a record where the name is mail, the type is NS, and the value points to the external nameserver (e.g., ns1.otherprovider.com).
  • Configure the Secondary Zone: On the external provider, ensure they have authority over the mail.example.com zone. They may require you to verify ownership via a CNAME or TXT record placed back in your primary zone.
  • Wait for Propagation: Changes to NS records can take longer to propagate than simple A records due to caching levels in recursive resolvers.
This method effectively splits the responsibility. Queries for www.example.com go to your primary provider, while queries for mail.example.com are directed to the secondary provider. It is crucial to note that this delegation applies to the subdomain itself. You cannot delegate just one IP address; you delegate the entire subdomain zone.

Using Secondary DNS for Redundancy

Another common scenario involves wanting to use a different DNS server not for splitting records, but for redundancy or performance. Many users ask if they can simply list two different DNS servers for their domain. While you can assign multiple nameservers to a domain (e.g., one at Cloudflare and one at AWS Route53), they must both contain identical data unless you are using specific dynamic features. If you configure a secondary DNS service, it acts as a backup. If your primary provider goes down, the secondary takes over. However, both servers must be synchronized. Most major providers offer "secondary DNS" or "zone transfer" capabilities. You configure your primary server to allow zone transfers (AXFR/IXFR) to the secondary server. The secondary server then pulls the complete zone file from the primary. This setup does not allow for different records on each server for the same domain. Both will answer with the same IPs. If you need different answers based on location or other factors, you generally need to use Anycast networks or intelligent load balancing features provided by your DNS host, rather than splitting the zone between two independent, unsynchronized providers.

Common Pitfalls and Verification

When implementing these strategies, several issues frequently arise. One is TTL (Time to Live) mismatches. If you change your nameservers, old records may persist in local caches for hours. Always lower your TTL before making major changes to minimize downtime. Another issue is misconfigured glue records. When delegating a subdomain to nameservers that are within the same domain (e.g., ns1.example.com), you must include glue records in the parent zone to prevent circular dependencies. Most modern dashboards handle this automatically, but manual configurations often fail here. To verify your setup, use tools like dig or online DNS checkers. Query the specific subdomain to see which nameserver responds. For example, running dig NS mail.example.com should return the external nameservers you delegated. If it returns your primary servers, the delegation has not taken effect or was configured incorrectly. For more details on connecting your domain to various DNS services, see Connecting to Your Domain and DNS Server Using a Program?. Additionally, understanding how different providers prioritize responses can help if you are experimenting with failover setups, as discussed in Prioritizing Failover DNS Servers: A Solution.

Frequently Asked Questions

Can I have different A records for the same domain name?

No, you cannot have two different authoritative sources providing conflicting A records for the exact same FQDN. The DNS protocol requires a single source of truth for any given record name. If you need different IPs for different users, you must use GeoDNS features or client-side configuration, not separate authoritative zones.

What happens if my primary DNS provider goes down?

If you have configured secondary nameservers correctly, the secondary provider will continue to answer queries. However, if you only have one nameserver listed at your registrar, your domain will become unreachable until the provider recovers. Always configure at least two distinct nameservers for redundancy.

Do I need to pay for separate DNS plans for subdomains?

Typically, no. Delegating a subdomain via NS records does not usually incur extra costs from your primary provider. However, the secondary provider might charge for hosting the zone for that subdomain. Check the pricing models of both providers to avoid unexpected fees.

How long does DNS delegation take to propagate?

Propagation depends on the TTL of the parent NS record. If your previous NS records had a high TTL (e.g., 24 hours), it could take up to that long for the change to fully propagate globally. Lowering the TTL beforehand can reduce this wait time significantly.

Can I use Cloudflare for some records and GoDaddy for others?

You can only do this by delegating specific subdomains. For example, you could keep example.com on GoDaddy and delegate app.example.com to Cloudflare. You cannot split the root domain itself between the two providers.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More