macOSMedium

DNS Lookup Failed Error on macOS: Causes and Quick Fixes

This article explains what the 'DNS lookup failed' error means in macOS and provides 5 proven ways to fix it—from simply restarting the network to configuring alternative DNS servers.

Updated at February 17, 2026
10-15 min
Easy
FixPedia Team
Применимо к:macOS Ventura 13.xmacOS Sonoma 14.xmacOS Sequoia 15.x

What Does the "DNS lookup failed" Error Mean

The "DNS lookup failed" error in macOS indicates that the operating system was unable to convert a domain name (e.g., fixpedia.ru) into its corresponding IP address. As a result, browsers and applications cannot locate servers on the internet, even though the network connection (Wi-Fi or Ethernet) may appear active. The error typically appears in browsers (Safari, Chrome), email clients, or when attempting to update software.

Common Causes

  1. Network connection or router issues. A temporary outage on the provider's side or within your home router.
  2. Incorrect or unresponsive DNS servers. The DNS servers configured in your system (often provided by your ISP) are not responding or are returning errors.
  3. Corrupted local DNS cache. The system cache (mDNSResponder) contains outdated or erroneous records.
  4. Incorrect entries in the hosts file. The /etc/hosts file may contain lines redirecting domains to incorrect IP addresses (e.g., 127.0.0.1).
  5. Conflict with a firewall or antivirus. Security software may be blocking outgoing DNS requests (port 53).
  6. Problems with VPN or proxy settings. Misconfiguration can intercept or disrupt DNS queries.

Solutions

Solution 1: Restart Network Hardware and Services

Start with the simplest actions, which resolve most temporary glitches.

  1. Toggle Wi-Fi. Click the Wi-Fi icon in the macOS menu bar and turn it off. Wait 10 seconds and turn it back on.
  2. Restart your router/modem. Unplug the device from power for 30 seconds, then plug it back in. Wait for it to fully boot (all indicators stabilize).
  3. Restart the network interface via Terminal. This is a "deeper" reboot than simply toggling Wi-Fi. First, identify your interface name (usually en0 for Wi-Fi or en1 for Ethernet) by running ifconfig | grep status. Then execute:
    sudo ifconfig en0 down
    sudo ifconfig en0 up
    
    (Replace en0 with your actual interface name).

💡 Tip: If you use Ethernet, try switching temporarily to Wi-Fi (or vice versa) to determine if the problem lies with the hardware or the specific interface's configuration.

Solution 2: Flush the macOS DNS Cache

The local DNS cache may contain outdated records causing errors. Flushing it is done via Terminal.

  1. Open Terminal (Finder → Utilities → Terminal).
  2. Enter the following command and press Enter:
    sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
    
  3. Enter your administrator password (characters will not be displayed — this is normal).
  4. After the command completes, try accessing the website again in your browser.

⚠️ Important: This command works for macOS 10.10 (Yosemite) and later. For older systems, use sudo discoveryutil mdnsflushcache.

Solution 3: Check and Edit the Hosts File

The /etc/hosts file allows manual mapping of domain names to IP addresses. If it contains erroneous entries (e.g., ad-blocking rules), it will cause DNS failures.

  1. In Terminal, open the file for editing with superuser privileges:
    sudo nano /etc/hosts
    
  2. Scroll through the file and look for lines containing known domains (e.g., google.com, apple.com, facebook.com) that are redirected to 127.0.0.1, 0.0.0.0, or other local addresses.
  3. Add a # symbol at the beginning of each such line to comment it out, or delete the line entirely.
  4. Press Ctrl + O to save, then Enter. Press Ctrl + X to exit nano.
  5. Flush the DNS cache (as in Solution 2) and test your internet connection.

Solution 4: Configure Public DNS Servers (Cloudflare, Google)

Often, the problem lies with your internet provider's DNS servers. Switching to reliable public servers resolves the issue.

  1. Open System SettingsNetwork.
  2. Select your active connection (Wi-Fi or Ethernet) and click Details....
  3. Go to the DNS tab.
  4. Click + and add the following addresses (choose one set):
    • Cloudflare: 1.1.1.1 and 1.0.0.1
    • Google: 8.8.8.8 and 8.8.4.4
  5. Remove all old DNS servers from the list by selecting them and clicking -.
  6. Click OK, then Apply.
  7. Test your internet access. If the issue was with your ISP's DNS, it should now be resolved.

Solution 5: Check for Conflicts with VPN, Firewall, and in Safe Mode

If the previous steps didn't help, the problem may be with third-party software.

  1. Temporarily disable your VPN (if used) and any third-party firewalls/antivirus software (Little Snitch, McAfee, Kaspersky, etc.). Check if the internet works.
  2. Boot into Safe Mode. This loads macOS with only essential system extensions, disabling third-party ones. Instructions:
    • Restart your Mac.
    • Immediately after restart, hold the Shift key (⇧) until you see the login window.
    • Log in. If the internet works in Safe Mode, the problem is with some installed software (a VPN daemon, ad blocker, optimization utility).
  3. Check proxy settings. In System SettingsNetworkDetailsProxies, ensure all checkboxes are unchecked unless you are using a corporate proxy.

Solution 6: Update macOS and Reset Network Settings

If the problem appeared after a system update or has persisted for a long time:

  1. Install macOS updates. Go to System SettingsGeneralSoftware Update. Install all available updates, especially those related to "networking" or "security".
  2. Reset network settings. This is a more drastic step that will delete saved Wi-Fi networks, VPN configurations, etc.
    • In System SettingsNetwork, select Wi-Fi.
    • Click Remove at the bottom of the preferred networks list.
    • For a full reset, you can use Terminal:
      sudo rm /Library/Preferences/SystemConfiguration/com.apple.network.eppc.plist
      sudo rm /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist
      sudo rm /Library/Preferences/SystemConfiguration/com.apple.network.identification.plist
      sudo rm /Library/Preferences/SystemConfiguration/com.apple.wifi.message-tracer.plist
      sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
      sudo rm /Library/Preferences/SystemConfiguration/preferences.plist
      
      Restart your Mac after this. The system will recreate these files with default settings. You will need to reconnect to Wi-Fi networks.

Prevention

  • Use stable public DNS servers (Cloudflare, Google) if your ISP's DNS frequently fails.
  • Avoid installing third-party "network optimizers" and questionable utilities that may modify system files or settings.
  • Keep macOS regularly updated — updates often contain fixes for the network stack.
  • Do not edit the /etc/hosts file without fully understanding what you are doing. If you use hosts files for ad blocking, use reputable lists and review them periodically.
  • When using a VPN, choose reliable providers that handle DNS correctly (support their own DNS or DoH/DoT).

F.A.Q.

Why did my Mac suddenly lose internet connection even though Wi-Fi is connected?
Do I need to restart my Mac after resetting DNS?
Can antivirus or firewall cause this error?
Why do public DNS (1.1.1.1, 8.8.8.8) not work while provider DNS does?

Hints

Restart network services and router
Clear DNS cache
Check and fix the hosts file
Configure alternative DNS servers
FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

© 2026 FixPedia. All materials are available for free.

Made with for the community