<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/URLError/notConnectedToInternet",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation8URLErrorV22notConnectedToInternetAC4CodeVvpZ"
  },
  "title" : "notConnectedToInternet"
}
-->

# notConnectedToInternet

A network resource was requested, but an internet connection hasn’t been established and can’t be established automatically.

```
static var notConnectedToInternet: URLError.Code { get }
```

## Discussion

This error occurs when a connection can’t be established a lack of connectivity or because the user chooses not to make a network connection automatically.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)