# HostUrl Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [HostUrl](/reference/api/csharp/aspire.hosting/hosturl.md)
- Kind: `Properties`
- Members: `1`

Represents a URL on the host machine. When referenced in a container resource, localhost will be replaced with the configured container host name.

## Url

- Name: `Url`
- Modifiers: `get; init`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/HostUrl.cs)

```csharp
public string Url { get; init; }
```
