<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreSpotlight",
  "identifier" : "/documentation/CoreSpotlight/CSSearchableItemAttributeSet/domainIdentifier",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Spotlight",
      "CoreSpotlight"
    ],
    "preciseIdentifier" : "c:objc(cs)CSSearchableItemAttributeSet(py)domainIdentifier"
  },
  "title" : "domainIdentifier"
}
-->

# domainIdentifier

An identifier that represents the domain or owner of the item.

```
var domainIdentifier: String? { get set }
```

## Discussion

Specify a domain identifier to group items together and make it easier to delete
them from the index. For example, to delete a user activity, set this property on the
<doc://com.apple.documentation/documentation/Foundation/NSUserActivity/contentAttributeSet>
property of the <doc://com.apple.documentation/documentation/Foundation/NSUserActivity>
object and then call [`deleteSearchableItems(withDomainIdentifiers:completionHandler:)`](/documentation/CoreSpotlight/CSSearchableIndex/deleteSearchableItems(withDomainIdentifiers:completionHandler:))
on your app’s index.

---

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)