NSURLErrorNotConnectedToInternet
NSURLErrorNotConnectedToInternet No Internet Connection Error
What This Error Means
The NSURLErrorNotConnectedToInternet error signals that the iOS device cannot establish a connection to the internet. This means that the device is unable to reach any network resources, preventing the app from successfully making network requests.
Common Causes
- Wi-Fi is disabled or not connected to a network.
- Cellular data is disabled or unavailable (e.g., out of range).
- Airplane mode is enabled.
- The device is connected to a Wi-Fi network, but the network has no internet access (e.g., captive portal requiring login).
- Network configuration issues (e.g., incorrect DNS settings).
How to Fix It (For Users)
- 1 Verify that Wi-Fi is enabled and connected to a working network.
- 2 Ensure cellular data is enabled and that the device has a strong cellular signal.
- 3 Disable airplane mode.
- 4 If connected to Wi-Fi, check if the network requires login (captive portal).
- 5 Restart the device to refresh network connections.
For Site Owners / Developers
- Implement robust error handling to gracefully handle network connectivity issues.
- Check Reachability before making network requests to proactively detect network availability.
- Provide informative error messages to the user, guiding them to check their network connection.
- Consider using a network monitoring library (e.g., ReachabilitySwift) to track network status changes.
- Implement retry mechanisms for failed network requests when connectivity is restored.
When It Is NOT Your Fault
This error is usually caused by the user's device not having a working internet connection. It is rarely caused by server-side issues, assuming the server is functioning correctly and accessible.
Is the website actually down?
Sometimes the issue is just on your end. Check if the website is down for everyone or just you.
Check Website Status →Recommended Tool to Prevent This Error
Prevent server timeouts and resource exhaustion with scalable cloud infrastructure.