While browsing the web on macOS, clicking a link or loading a website can suddenly trigger the Safari error screen: “Safari can’t open the page ‘[URL]’ because the network connection was lost.” This abrupt interruption often strikes while other desktop applications (such as email clients or Slack) appear to connect normally. The error indicates that the underlying TCP/IP socket between Safari’s WebKit networking framework and the remote web server was abruptly severed or dropped before the HTTP payload could be received.
Toggle Off iCloud Private Relay
Apple’s iCloud Private Relay routes Safari web requests through a dual-hop encrypted proxy architecture. If either the ingress Apple relay or egress partner node (e.g. Cloudflare or Fastly) experiences packet loss or throttling, Safari drops connections:
- Click the Apple menu in the top-left corner and select System Settings.
- Click your Apple Account name at the top of the sidebar.
- Select iCloud, then scroll down to Private Relay.
- Toggle Private Relay to Off (select Turn Off Until Tomorrow or Turn Off Private Relay).
- Return to Safari and refresh the failing webpage. If the site loads immediately, the iCloud relay proxy was the bottleneck.
Flush DNS Resolver Cache via Terminal
Stale or corrupted domain name records cached in macOS mDNSResponder can direct Safari to dead IP addresses:
- Press Command + Space to launch Spotlight, type
Terminal, and press Return. - Execute the following combined DNS flush command:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder - Enter your Mac administrator password when prompted.
- Quit Safari completely (Command + Q), relaunch the browser, and attempt to reload the webpage.
Inspect Third-Party Network Extensions, VPNs, and Proxies
Security utilities, local proxies, and firewall monitors (such as Little Snitch, NordVPN, or corporate web filters) install network socket filters that frequently drop keep-alive packets:
- Open System Settings > Network > VPN & Filters.
- Under the Filters & Proxies section, look for active content filters.
- Temporarily disable third-party firewall filters or disconnect your active VPN tunnel.
- Navigate to System Settings > Network > Wi-Fi, click Details… next to your active network, and select the Proxies tab.
- Ensure that all proxy protocol checkboxes (such as Web Proxy HTTP, Secure Web Proxy HTTPS, and SOCKS Proxy) are unticked unless explicitly mandated by your workplace.
Clear Safari Web Data and Browser Cache
Corrupted HTTP/2 or HTTP/3 session tickets saved in Safari’s local cache can cause immediate TLS handshake resets:
- With Safari open, choose Safari > Settings > Privacy.
- Click Manage Website Data….
- Search for the specific domain throwing the network connection lost error, click Remove, and click Done.
- Enable developer tools: go to Safari > Settings > Advanced and tick Show features for web developers.
- Click Develop in the top macOS menu bar and select Empty Caches (Option + Command + E).
Switch to Reliable Public DNS Servers
ISP-provided DNS servers frequently drop DNS queries during network congestion:
- Go to System Settings > Network > Wi-Fi and click Details….
- Select the DNS tab in the sidebar.
- Click the plus (+) button under DNS Servers and add Cloudflare DNS (
1.1.1.1) and Google Public DNS (8.8.8.8). - Click OK and test Safari browsing.