Complete Guide to Troubleshooting DNS Issues: Common Problems and Solutions
Complete Guide to Troubleshooting DNS Issues: Common Problems and Solutions
DNS issues can cause websites to become unreachable, emails to bounce, and applications to fail. This comprehensive guide covers the most common DNS problems and provides step-by-step solutions to resolve them quickly.
Common DNS Problems and Symptoms
1. Website Not Loading
Symptoms:
- “Server not found” errors
- “DNS_PROBE_FINISHED_NXDOMAIN” in Chrome
- “This site can’t be reached” messages
- Slow page loading times
2. Email Delivery Issues
Symptoms:
- Emails bouncing back
- Delayed email delivery
- Emails going to spam
- “Mail server not found” errors
3. Intermittent Connectivity
Symptoms:
- Website works sometimes, fails other times
- Different behavior from different locations
- Services work on some devices but not others
Essential DNS Troubleshooting Tools
Command Line Tools
Windows
# Check DNS resolution
nslookup example.com
# Flush DNS cache
ipconfig /flushdns
# Display DNS cache
ipconfig /displaydns
# Check specific record type
nslookup -type=MX example.com
macOS/Linux
# Check DNS resolution
dig example.com
# Detailed DNS query
dig example.com +trace
# Check specific record types
dig example.com MX
dig example.com TXT
# Flush DNS cache (macOS)
sudo dscacheutil -flushcache
# Flush DNS cache (Linux)
sudo systemctl restart systemd-resolved
Online DNS Tools
- DNS Checker: Verify records from multiple locations
- MX Toolbox: Comprehensive DNS and email testing
- WhatsMyDNS: Global DNS propagation checking
- DNS Lookup Tools: Record analysis and validation
Step-by-Step Troubleshooting Process
Step 1: Identify the Problem Scope
Test from Multiple Devices
# Test from command line
ping example.com
# Test web access
curl -I http://example.com
# Test specific ports
telnet example.com 80
Check from Different Networks
- Test from mobile data vs WiFi
- Try from different geographic locations
- Use online testing tools from various regions
Step 2: Verify DNS Records
Check Basic Records
# A record
dig example.com A
# AAAA record (IPv6)
dig example.com AAAA
# CNAME record
dig www.example.com CNAME
# MX records
dig example.com MX
# NS records
dig example.com NS
Verify Record Accuracy
- Confirm IP addresses are correct
- Check CNAME targets exist
- Validate MX record priorities
- Ensure NS records point to active servers
Step 3: Test DNS Resolution Path
Trace DNS Query
# Full DNS trace
dig +trace example.com
# Query specific DNS server
dig @8.8.8.8 example.com
dig @1.1.1.1 example.com
# Query authoritative servers
dig @ns1.example.com example.com
Compare DNS Servers
Test multiple DNS servers to identify inconsistencies:
# Google DNS
dig @8.8.8.8 example.com
# Cloudflare DNS
dig @1.1.1.1 example.com
# Your ISP DNS (check current DNS server)
cat /etc/resolv.conf
Common DNS Issues and Solutions
Issue 1: Domain Not Resolving
Possible Causes:
- Incorrect NS records
- DNS server downtime
- Recent domain changes not propagated
- Expired domain registration
Solutions:
# Check NS records
dig example.com NS
# Verify NS servers are responding
dig @ns1.example.com example.com
# Check domain registration status
whois example.com
Fix:
- Verify NS records point to active DNS servers
- Contact DNS provider if servers are down
- Wait for propagation if recent changes were made
- Renew domain if expired
Issue 2: Slow DNS Resolution
Possible Causes:
- High TTL values during changes
- DNS server overload
- Network connectivity issues
- DNS cache problems
Solutions:
# Test resolution time
time dig example.com
# Try different DNS servers
dig @8.8.8.8 example.com
dig @1.1.1.1 example.com
# Check local DNS settings
cat /etc/resolv.conf
Fix:
- Switch to faster DNS servers (8.8.8.8, 1.1.1.1)
- Clear DNS caches
- Lower TTL values temporarily
- Contact ISP if network issues persist
Issue 3: Email Delivery Problems
Possible Causes:
- Incorrect MX records
- Missing SPF/DKIM records
- MX server downtime
- DNS propagation issues
Solutions:
# Check MX records
dig example.com MX
# Verify MX server connectivity
telnet mail.example.com 25
# Check SPF records
dig example.com TXT | grep spf
# Check DKIM records
dig default._domainkey.example.com TXT
Fix:
- Verify MX records point to correct mail servers
- Test mail server connectivity
- Configure SPF, DKIM, and DMARC records
- Check mail server logs for additional errors
Issue 4: Partial DNS Resolution
Possible Causes:
- DNS propagation in progress
- Inconsistent records across servers
- Cached old records
- DNS provider synchronization issues
Solutions:
# Check multiple DNS servers
for server in 8.8.8.8 1.1.1.1 208.67.222.222; do
echo "Testing $server:"
dig @$server example.com A
done
# Check from different geographic locations
# Use online tools for global testing
Fix:
- Wait for complete propagation (up to 48 hours)
- Clear caches at all levels
- Verify record consistency across authoritative servers
- Contact DNS provider if inconsistencies persist
Advanced Troubleshooting Techniques
DNS Cache Analysis
Check Browser DNS Cache
# Chrome
chrome://net-internals/#dns
# Firefox
about:networking#dns
System-Level Cache Investigation
# Windows - view DNS cache
ipconfig /displaydns | findstr "example.com"
# macOS - DNS statistics
sudo dscacheutil -statistics
# Linux - check systemd-resolved
systemd-resolve --status
Network-Level Debugging
Packet Capture
# Capture DNS queries (requires root)
tcpdump -i any port 53
# Monitor specific domain queries
tcpdump -i any port 53 and host example.com
DNS Query Monitoring
# Monitor DNS queries in real-time
dig +trace +stats example.com
# Check query response codes
dig example.com +short +dnssec
Prevention and Monitoring
Proactive DNS Monitoring
Set Up Monitoring Tools
- DNS monitoring services: Pingdom, UptimeRobot, StatusCake
- Internal monitoring: Nagios, Zabbix, Prometheus
- Log analysis: ELK stack, Splunk
Key Metrics to Monitor
- DNS resolution time
- Query success rate
- Record availability
- Propagation status
Best Practices for DNS Reliability
1. Use Multiple DNS Providers
# Primary NS
ns1.provider1.com
ns2.provider1.com
# Secondary NS
ns1.provider2.com
ns2.provider2.com
2. Implement Health Checks
Monitor your DNS infrastructure:
- Regular resolution testing
- Authoritative server monitoring
- Geographic availability checks
3. Maintain DNS Documentation
Keep records of:
- Current DNS configuration
- Recent changes and dates
- Emergency contact information
- Rollback procedures
Emergency Response Procedures
DNS Emergency Checklist
-
Identify Scope
- Which records are affected?
- What services are impacted?
- How many users are affected?
-
Immediate Actions
- Check authoritative servers
- Verify recent changes
- Test from multiple locations
-
Quick Fixes
- Revert recent changes if necessary
- Switch to backup DNS providers
- Clear DNS caches
-
Communication
- Notify stakeholders
- Update status pages
- Provide regular updates
Recovery Steps
-
Implement Fix
- Correct DNS records
- Verify changes propagate
- Test functionality
-
Monitor Recovery
- Track propagation progress
- Monitor error rates
- Verify service restoration
-
Post-Incident Analysis
- Document root cause
- Implement preventive measures
- Update procedures
Conclusion
DNS troubleshooting requires systematic analysis and the right tools. By following this guide’s step-by-step approach, you can quickly identify and resolve most DNS issues. Remember that prevention through monitoring and proper configuration is always better than reactive troubleshooting.
Keep this guide handy for future reference, and don’t hesitate to escalate to DNS experts when dealing with complex issues that impact critical business operations.
Use our DNS lookup tool to diagnose DNS issues and verify your domain’s configuration in real-time.