Understanding NXDOMAIN
NXDOMAIN means the domain name does not exist in DNS.
Quick Diagnosis
dig yourdomain.com
# Look for "status: NXDOMAIN" in output
Fix 1: Check Domain Registration
Verify domain is registered and not expired:
whois yourdomain.com | grep -E "Expiry|Expiration"
If expired, renew immediately.
Fix 2: Verify Nameservers
Ensure domain has nameservers configured at registrar:
dig NS yourdomain.com
# If no NS records, add them in registrar control panel
Fix 3: Check DNS Zone File
If you manage DNS, ensure zone exists on nameservers:
# For BIND
named-checkzone yourdomain.com /var/named/yourdomain.com.db
Fix 4: New Domain/Slow Propagation
New domains can take up to 72 hours to resolve globally.
Fix 5: Typo in Domain
Check for spelling errors:
# yourdomain.com vs yourdomain.co (different TLD)
Fix 6: Check Subdomain
NXDOMAIN for subdomain but main domain works:
# Add A/CNAME record for subdomain in DNS zone
Fix 7: DNS Resolver Cache
Some resolvers may have cached negative response:
# Wait for TTL expiry (minutes to hours)