---
title: allowsPersistentDNS
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsmutableurlrequest/allowspersistentdns
---

# allowsPersistentDNS

A Boolean value that indicates whether storing and usage of DNS answers in a persistent per-process cache is allowed.

## Declaration

```swift
var allowsPersistentDNS: Bool { get set }
```

## Discussion

Discussion This should only be set for hostnames whose resolutions are not expected to change across networks. Defaults to NO.
