DNS delegation is the process where authority over a subdomain is transferred from one nameserver to another. It's fundamentally how the hierarchical DNS system operates. When you register abc.com, you're essentially creating a delegation point in the global DNS tree.
Let's trace a complete delegation chain for abc.com:
1. Root servers delegate .com to TLD servers 2. .com TLD servers delegate abc.com to registrar's nameservers 3. Registrar's nameservers may delegate abc.com to your custom nameservers
Delegation is implemented through NS (Name Server) records. For abc.com to delegate sub.abc.com, these records would appear:
; Zone file for abc.com $TTL 3600 @ IN SOA ns1.abc.com. admin.abc.com. ( ... ) IN NS ns1.abc.com. IN NS ns2.abc.com. ; Delegation for sub.abc.com sub IN NS ns1.sub.abc.com. IN NS ns2.sub.abc.com.
When nameservers are within the delegated domain (like ns1.abc.com for abc.com), glue records become essential. These are A/AAAA records provided by the parent zone to resolve the circular dependency:
; Example glue records at registrar level ns1.abc.com. IN A 192.0.2.1 ns2.abc.com. IN A 192.0.2.2
Most home user setups fail at these points:
- Not updating NS records at the registrar
- Forgetting glue records for in-domain nameservers
- Mismatched TTL values causing propagation issues
Use dig to verify proper delegation:
dig +trace abc.com dig NS abc.com @8.8.8.8 dig +norecurse @a.gtld-servers.net abc.com NS
For programmatic management, here's a Python example using Cloudflare API:
import requests headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Content-Type': 'application/json' } payload = { "type": "NS", "name": "sub.abc.com", "content": "ns1.sub.abc.com", "ttl": 3600 } response = requests.post( 'https://api.cloudflare.com/client/v4/zones/ZONE_ID/dns_records', headers=headers, json=payload )
DNS delegation is the process where authority over a subdomain is transferred from the parent zone to another nameserver set. When you register abc.com, the .com registry delegates control to your registrar's nameservers, which then need to delegate to your custom nameservers.
Here's the complete delegation chain for abc.com:
Root Server → .COM TLD Server → Registrar NS (e.g., ns1.godaddy.com) → Your NS (e.g., ns1.abc.com)
When your nameservers use the same domain (ns1.abc.com), you need glue records at the registrar level:
; Registrar's DNS zone file
abc.com. IN NS ns1.abc.com.
abc.com. IN NS ns2.abc.com.
ns1.abc.com. IN A 192.0.2.1
ns2.abc.com. IN A 192.0.2.2
These are frequent failure points I've encountered in production:
- Missing glue records when nameservers are under the same domain
- TTL values too high during DNS migration
- Incorrect NS records at the parent zone
Use dig to validate each delegation step:
# Check root hints
dig +trace abc.com
# Verify NS records
dig abc.com NS
# Check glue records
dig @registrar-ns abc.com NS
From production experience:
- Always set up at least two nameservers in different networks
- Keep TTLs low (300-600) before making changes
- Monitor propagation with tools like DNSCHECKER
When client reports "DNS not resolving", I run this checklist:
# 1. Check root delegation
dig +nocmd +nocomments abc.com. SOA
# 2. Verify nameserver connectivity
for ns in $(dig +short abc.com. NS); do
dig @$ns abc.com. SOA +short || echo "$ns FAILED"
done
# 3. Validate glue records
dig $(dig +short abc.com. NS) +short
Remember that DNS changes can take up to 48 hours to fully propagate globally due to caching implementations at various levels of the DNS hierarchy.