<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKSecurityOrigin",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKSecurityOrigin"
  },
  "title" : "WKSecurityOrigin"
}
-->

# WKSecurityOrigin

An object that identifies the origin of a particular resource.

```
@MainActor class WKSecurityOrigin
```

## Overview

A [`WKSecurityOrigin`](/documentation/WebKit/WKSecurityOrigin) object is a transient, data-only object that identifies the host name, protocol, and port number associated with a particular resource. You don’t create [`WKSecurityOrigin`](/documentation/WebKit/WKSecurityOrigin) objects directly. Instead, WebKit creates them for the resources it loads. A *first-party* load is any load URL has the same security origin as the requesting web site. First-party webpages can access each other’s resources, such as scripts and databases.

Because a [`WKSecurityOrigin`](/documentation/WebKit/WKSecurityOrigin) object is transient, it doesn’t uniquely identify a security origin across multiple delegate method calls.

## Topics

### Getting the Host Information

[`host`](/documentation/WebKit/WKSecurityOrigin/host)

The security origin’s host.

[`port`](/documentation/WebKit/WKSecurityOrigin/port)

The security origin’s port.

### Getting the Host Protocol

[`protocol`](/documentation/WebKit/WKSecurityOrigin/protocol)

The security origin’s protocol.



---

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)