# withHostHttpsPort

- Module: [Aspire.Hosting.Yarp](/reference/api/typescript/aspire.hosting.yarp.md)
- Version: `13.4.0`
- Kind: `method`
- Source: [GitHub](https://github.com/microsoft/aspire)

Configures the host HTTPS port that the YARP resource is exposed on instead of using randomly assigned port. This will only have effect if an HTTPS endpoint is configured on the YARP resource due to TLS termination being enabled.

## Definition

```typescript
interface YarpResource {
  // ... omitted for brevity
  withHostHttpsPort(port: number): YarpResource
}
```

## Parameters

- `port` (`number`)

## Returns

[YarpResource](/reference/api/typescript/aspire.hosting.yarp/yarpresource.md) `builder`

## Applies to

- [YarpResource](/reference/api/typescript/aspire.hosting.yarp/yarpresource.md)
