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

# customUserAgent

The custom user agent string.

## Declaration

```swift
var customUserAgent: String? { get set }
```

## Discussion

Discussion Use this property to specify a custom user agent string for your web view. The default value of this property is nil.

## See Also

### Inspecting the view information

- [scrollView](webkit/wkwebview/scrollview.md)
- [title](webkit/wkwebview/title.md)
- [url](webkit/wkwebview/url.md)
- [mediaType](webkit/wkwebview/mediatype.md)
- [serverTrust](webkit/wkwebview/servertrust.md)
- [hasOnlySecureContent](webkit/wkwebview/hasonlysecurecontent.md)
- [themeColor](webkit/wkwebview/themecolor.md)
- [underPageBackgroundColor](webkit/wkwebview/underpagebackgroundcolor.md)
