How to delegate a subdomain to another server
Handing DNS control of one subdomain to a different set of nameservers, while everything else on the domain stays exactly where it is.
Delegating a subdomain means handing DNS control of just that one subdomain — not the whole domain — to a different set of nameservers, using an NS record instead of the CNAME most subdomain setups use. Whoever runs those nameservers can then manage every record under that subdomain independently, without touching your main domain's DNS at all.
How this differs from a normal subdomain
Most subdomains are just another record inside your existing DNS zone — an A record or a CNAME sitting alongside everything else, managed in the same place as your main domain. Delegation is different: instead of answering directly, your DNS zone points the subdomain at a completely separate set of nameservers, which then become authoritative for everything under that subdomain from that point on.
| Normal subdomain record | Delegated subdomain | |
|---|---|---|
| Managed where? | Your existing DNS zone | A separate nameserver, potentially run by a different company entirely |
| Record type used | A or CNAME | NS |
| Who controls records under it | You, alongside your main domain | Whoever runs the nameservers it was delegated to |
Why you would delegate rather than just add a record
Delegation matters when a subdomain needs to be managed by a system you do not directly control — a platform that runs its own DNS for customers using a subdomain of their own domain, for instance, or an internal team that manages one specific subdomain's infrastructure independently and needs to make DNS changes without going through your main zone. It is not the right tool for an ordinary subdomain pointing at a single server, which a plain A or CNAME record handles more simply.
Setting it up
-
Get the nameservers you are delegating to
The service or team taking over the subdomain will provide the nameserver hostnames responsible for it. Copy these exactly.
-
Add an NS record in your existing DNS zone
In your control panel, add a record of type NS with the subdomain as the name — for example
appforapp.yourdomain.com— and each of the provided nameservers as separate values.app.yourdomain.com. NS ns1.example-dns-service.com. app.yourdomain.com. NS ns2.example-dns-service.com. -
Leave your main zone alone otherwise
Do not add A, CNAME, or any other record for that same subdomain name in your own zone — once it is delegated, your zone should only hold the NS records pointing away from it. Any other record type at that name conflicts with the delegation and produces inconsistent results.
Once delegated, whoever runs those nameservers can add or remove any record under that subdomain — additional subdomains beneath it, mail records, anything — entirely without your involvement. Only delegate to a service or team you would trust with direct DNS access, since that is functionally what this grants them.
Checking delegation is working
dig +short NS app.yourdomain.com
dig +trace app.yourdomain.com
The first command should return the nameservers you delegated to. The second traces the full resolution path, which is genuinely useful here: it shows the query being handed off from your domain's nameservers to the delegated ones partway through, confirming the handoff is actually happening rather than being silently ignored.
A typical real-world example
A common case is a platform that lets its own customers use a subdomain of their business's domain to reach a service the platform runs — a helpdesk, a booking system, or a hosted storefront, for example. Rather than asking every customer to add individual A or CNAME records that the platform would need to keep updated as its own infrastructure changes, the platform asks each customer to delegate one subdomain to its nameservers instead. From then on, the platform can add, remove, or repoint records under that subdomain freely, on its own schedule, without ever needing the customer to make another DNS change.
Reversing a delegation
To hand a delegated subdomain back to your own DNS zone, simply remove the NS record you created and add whichever ordinary record — A or CNAME — the subdomain needs going forward. There is no special "undelegate" step beyond this; removing the NS record is what returns authority for that name back to your own zone. As with any DNS change, allow time for the switch to spread before assuming it has not taken effect, and be aware that whoever previously ran the delegated nameservers may keep answering for a short period afterwards while caches elsewhere catch up.
Common problems
- A conflicting record left in your own zone. An old A or CNAME record under the same name as the delegation will produce inconsistent answers depending on which record a resolver happens to prefer.
- Only some of the delegated nameservers were entered. Add every nameserver the receiving service specifies, not just the first one — an incomplete list can make the delegation appear to work intermittently.
- The receiving nameservers are not actually configured yet. Delegation only works once the target nameservers are ready to answer for that subdomain; check with whoever provided them if queries are timing out rather than returning an answer.
Subdomain delegation is a more advanced setup than most sites will ever need — see how to add a CNAME record if what you actually need is a straightforward subdomain pointing at a single destination rather than a fully independent DNS zone.
Related reading
They decide who gets to answer questions about your domain — and changing them hands your whole domain to a different company.
Every DNS record type, explained plainlyWhat each DNS record type actually does, in plain terms, and the handful you will realistically ever need to touch.
How to add a CNAME recordA CNAME points one name at another instead of at an address, and it comes with one hard rule about what else can share its name.
Can I use a domain I bought somewhere else?Yes — a domain registered anywhere can be hosted with us without ever moving its actual registration.