How to Check & Fix DNS Issues

Domain Name System (DNS) issues can cause websites to become inaccessible, disrupt email services, or slow down browsing. DNS is responsible for translating domain names (e.g., example.com) into IP addresses that computers use to identify servers. If DNS fails, users may experience errors such as "DNS Server Not Found" or "DNS_PROBE_FINISHED_NXDOMAIN." This guide covers how to check and fix DNS issues effectively.


1. How to Check for DNS Issues

Before fixing DNS issues, determine the source of the problem using the following methods:

1.1 Use Command Line Tools

Check DNS Resolution with nslookup

Run the following command in the terminal (Windows, Mac, Linux) to check if the domain resolves correctly:

nslookup example.com

If the response does not return an IP address, the DNS server may be down or misconfigured.

Test with Ping

To check connectivity to the server:

ping example.com

If the ping fails but resolves an IP address, the issue may be with the website’s server rather than DNS.

Use dig (Linux/Mac)

To query DNS records:

dig example.com

This will display the DNS response from the queried server, helping diagnose propagation issues.

1.2 Check DNS Status with Online Tools

These tools help verify DNS records across different locations.

1.3 Flush DNS Cache

Cached DNS records may cause incorrect or outdated resolutions. To clear the cache:

  • Windows:

    ipconfig /flushdns
  • Mac:

    sudo killall -HUP mDNSResponder
  • Linux:

    sudo systemd-resolve --flush-caches

2. How to Fix DNS Issues

If DNS issues persist, try the following solutions.

2.1 Restart Your Router and Modem

A simple router reboot can resolve network-related DNS issues. Turn off the modem and router, wait 10 seconds, then turn them back on.

2.2 Change DNS Servers

If your ISP’s DNS is slow or unreliable, switch to a public DNS provider:

  • Google DNS: 8.8.8.8 and 8.8.4.4

  • Cloudflare DNS: 1.1.1.1 and 1.0.0.1

  • OpenDNS: 208.67.222.222 and 208.67.220.220

Windows:

  1. Open Control Panel > Network and Internet > Network and Sharing Center.

  2. Click Change adapter settings.

  3. Right-click your network and select Properties.

  4. Select Internet Protocol Version 4 (TCP/IPv4) and click Properties.

  5. Choose Use the following DNS server addresses and enter the new DNS addresses.

  6. Click OK and restart your connection.

Mac:

  1. Open System Preferences > Network.

  2. Select your connection and click Advanced.

  3. Go to the DNS tab and add the new DNS servers.

  4. Click OK and Apply.

2.3 Check Your Hosts File

A misconfigured hosts file can override DNS settings.

Windows:

  1. Open Notepad as an administrator.

  2. Navigate to C:\Windows\System32\drivers\etc\hosts.

  3. Ensure no incorrect entries are redirecting domains.

Mac/Linux:

  1. Open Terminal and run:

    sudo nano /etc/hosts
  2. Remove incorrect entries and save the file.

2.4 Check Firewall and Security Software

Firewalls and antivirus programs can block DNS queries. Temporarily disable security software to see if it resolves the issue.

2.5 Check Domain’s DNS Records

If you're troubleshooting a website’s DNS, check its DNS records:

  • A Record: Maps the domain to an IP address.

  • CNAME Record: Alias for another domain.

  • MX Record: Defines mail servers for email delivery.

Use an online DNS lookup tool or your hosting provider’s DNS management panel to verify these settings.

2.6 Restart DNS Services (Advanced Users)

On Windows, restart the DNS client service:

net stop dnscache
net start dnscache

On Linux:

sudo systemctl restart systemd-resolved

2.7 Check for DNS Propagation Delays

If you’ve recently changed DNS records, propagation can take up to 48 hours. Use WhatsMyDNS to check global propagation.


3. When to Contact Your ISP or Hosting Provider

If none of the above solutions work:

  • Contact your Internet Service Provider (ISP) if all websites fail to resolve.

  • Contact your domain registrar or hosting provider if only your website is affected.


Conclusion

DNS issues can be frustrating, but with systematic troubleshooting, they can be identified and resolved. Start by checking DNS resolution, clearing cache, and switching to reliable DNS servers. If problems persist, verify DNS records, inspect firewall settings, and check for misconfigurations. Following these steps will help ensure a smooth and reliable browsing experience.

Last updated

Was this helpful?