---
title: urlPathAllowed
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nscharacterset/urlpathallowed
---

# urlPathAllowed

Returns the character set for characters allowed in a path URL component.

## Declaration

```swift
class var urlPathAllowed: CharacterSet { get }
```

## Discussion

Discussion The path component of a URL is the component immediately following the host component (if present). It ends wherever the query or fragment component begins. For example, in the URL http://www.example.com/index.php?key1=value1, the path component is /index.php.

## See Also

### Getting Character Sets for URL Encoding

- [urlFragmentAllowed](foundation/nscharacterset/urlfragmentallowed.md)
- [urlHostAllowed](foundation/nscharacterset/urlhostallowed.md)
- [urlPasswordAllowed](foundation/nscharacterset/urlpasswordallowed.md)
- [urlQueryAllowed](foundation/nscharacterset/urlqueryallowed.md)
- [urlUserAllowed](foundation/nscharacterset/urluserallowed.md)
