---
title: name
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/host/name
---

# name

Returns one of the hostnames of the receiver.

## Declaration

```swift
var name: String? { get }
```

## Return Value

Return Value One of the hostnames of the receiver. Can be either a simple hostname, such as "sales", or a fully qualified domain name, such as "sales.anycorp.com".

## See Also

### Getting Host Information

- [address](foundation/host/address.md)
- [addresses](foundation/host/addresses.md)
- [localizedName](foundation/host/localizedname.md)
- [names](foundation/host/names.md)
