<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSUserActivity/webpageURL",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSUserActivity(py)webpageURL"
  },
  "title" : "webpageURL"
}
-->

# webpageURL

The URL of the webpage to load in a browser to continue the activity.

```
var webpageURL: URL? { get set }
```

## Discussion

When no suitable app is installed on a resuming device and the [`webpageURL`](/documentation/Foundation/NSUserActivity/webpageURL) property is set, the specified webpage is loaded and the user activity is continued in a web browser.

If your activity’s content can be restored on the web or you support Safari universal links, be sure to set this property so that the system can resume the activity in Safari or your app. After setting the [`webpageURL`](/documentation/Foundation/NSUserActivity/webpageURL) property on an activity for which [`isEligibleForSearch`](/documentation/Foundation/NSUserActivity/isEligibleForSearch) is <doc://com.apple.documentation/documentation/Swift/true>, also set the [`requiredUserInfoKeys`](/documentation/Foundation/NSUserActivity/requiredUserInfoKeys) property, using the keys of the [`userInfo`](/documentation/Foundation/NSUserActivity/userInfo) dictionary that must be stored. If you don’t also set the [`requiredUserInfoKeys`](/documentation/Foundation/NSUserActivity/requiredUserInfoKeys) property, the [`userInfo`](/documentation/Foundation/NSUserActivity/userInfo) dictionary will be empty when the activity is restored.

If [`isEligibleForSearch`](/documentation/Foundation/NSUserActivity/isEligibleForSearch) is <doc://com.apple.documentation/documentation/Swift/true> for this activity and you’re using both [`NSUserActivity`](/documentation/Foundation/NSUserActivity) and web markup to index the same item, set [`webpageURL`](/documentation/Foundation/NSUserActivity/webpageURL) to the relevant URL on your website to avoid showing duplicate results in Spotlight. The [`NSUserActivity`](/documentation/Foundation/NSUserActivity) API does not perform any modifications to the URL that you specify. URL components, such as the query string and the fragment identifier, are used for matching the item against pages that are indexed by Applebot.

> Note:
> The scheme of the ``doc://com.apple.foundation/documentation/Foundation/NSUserActivity/webpageURL`` must be `http` or `https`. Any other scheme throws an exception.

---

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)