---
title: "init(name:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/host/init(name:)"
---

# init(name:)

Returns a host with a specific name.

## Declaration

```swift
convenience init(name: String?)
```

## Parameters

- `name`: Name of the host to look up. Can be either a simple hostname, such as "sales", or a fully qualified domain name, such as "sales.anycorp.com".

## Return Value

Return Value The host named hostname.

## See Also

### Creating Hosts

- [current()](foundation/host/current().md)
- [init(address:)](foundation/host/init(address:).md)
