---
title: customUserAgent
framework: webkit
role: symbol
role_heading: Instance Property
path: webkit/webpage/customuseragent
---

# customUserAgent

The custom user agent string.

## Declaration

```swift
@MainActor final var customUserAgent: String? { get set }
```

## Discussion

Discussion Use this property to specify a custom user agent string for the webpage. The default value of this property is nil.

## See Also

### Inspecting page information

- [WebPage.CSSMediaType](webkit/webpage/cssmediatype.md)
- [title](webkit/webpage/title.md)
- [url](webkit/webpage/url.md)
- [mediaType](webkit/webpage/mediatype.md)
- [serverTrust](webkit/webpage/servertrust.md)
- [hasOnlySecureContent](webkit/webpage/hasonlysecurecontent.md)
- [themeColor](webkit/webpage/themecolor.md)
- [isBlockedByScreenTime](webkit/webpage/isblockedbyscreentime.md)
- [isInspectable](webkit/webpage/isinspectable.md)
- [isWritingToolsActive](webkit/webpage/iswritingtoolsactive.md)
