<!--
{
  "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/dnsLookupFailed",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation8URLErrorV15dnsLookupFailedAC4CodeVvpZ"
  },
  "title" : "dnsLookupFailed"
}
-->

# dnsLookupFailed

The host address couldn’t be found via DNS lookup.

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

## Discussion

This error code is no longer used. You should expect to handle [`cannotFindHost`](/documentation/Foundation/URLError/Code/cannotFindHost) instead.

---

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)