# OriginIpAddressType

The IP address type for the origin.

Determines whether CloudFront uses IPv4, IPv6, or both when connecting to the origin.

- Source: [`aws-cloudfront/lib/origin.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-cloudfront/lib/origin.ts#L28)
- Type last changed: v2.218.0 · 29 Sep 2025

## Example

```ts
const origin = new origins.HttpOrigin('www.example.com', {
  ipAddressType: cloudfront.OriginIpAddressType.IPV6, // IPv4, IPv6, or DUALSTACK
});

new cloudfront.Distribution(this, 'Distribution', {
  defaultBehavior: { origin },
});
```

## Members

| Member | Description |
| --- | --- |
| `IPV4` | Use only IPv4 addresses. |
| `IPV6` | Use only IPv6 addresses. |
| `DUALSTACK` | Use both IPv4 and IPv6 addresses. |

## Referenced by

- [`FunctionUrlOriginProps`](/v2/docs/aws-cdk-lib.aws_cloudfront_origins.FunctionUrlOriginProps).ipAddressType
- [`HttpOriginProps`](/v2/docs/aws-cdk-lib.aws_cloudfront_origins.HttpOriginProps).ipAddressType
