---
title: URL.FormatStyle.HostDisplayOption
framework: foundation
role: symbol
role_heading: Structure
path: foundation/url/formatstyle/hostdisplayoption
---

# URL.FormatStyle.HostDisplayOption

A type that indicates whether a formatted URL should include the host component.

## Declaration

```swift
struct HostDisplayOption
```

## Topics

### Display options

- [always](foundation/url/formatstyle/hostdisplayoption/always.md)
- [never](foundation/url/formatstyle/hostdisplayoption/never.md)
- [omitIfHTTPFamily](foundation/url/formatstyle/hostdisplayoption/omitifhttpfamily.md)
- [displayWhen(_:matches:)](foundation/url/formatstyle/hostdisplayoption/displaywhen(_:matches:).md)
- [omitWhen(_:matches:)](foundation/url/formatstyle/hostdisplayoption/omitwhen(_:matches:).md)
- [omitSpecificSubdomains(_:includeMultiLevelSubdomains:)](foundation/url/formatstyle/hostdisplayoption/omitspecificsubdomains(_:includemultilevelsubdomains:).md)
- [omitSpecificSubdomains(_:includeMultiLevelSubdomains:when:matches:)](foundation/url/formatstyle/hostdisplayoption/omitspecificsubdomains(_:includemultilevelsubdomains:when:matches:).md)
- [URL.FormatStyle.Component](foundation/url/formatstyle/component.md)

## Relationships

### Conforms To

- [CustomStringConvertible](swift/customstringconvertible.md)
- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Creating a URL format style

- [init(scheme:user:password:host:port:path:query:fragment:)](foundation/url/formatstyle/init(scheme:user:password:host:port:path:query:fragment:).md)
- [URL.FormatStyle.ComponentDisplayOption](foundation/url/formatstyle/componentdisplayoption.md)
