# CustomDomainOptions

Options while specifying custom domain.

- Source: [`aws-cognito/lib/user-pool-domain.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-cognito/lib/user-pool-domain.ts#L46)
- Type last changed: v2.235.0 · 15 Jan 2026

## Example

```ts
const pool = new cognito.UserPool(this, 'Pool');

pool.addDomain('CognitoDomain', {
  cognitoDomain: {
    domainPrefix: 'my-awesome-app',
  },
});

const certificateArn = 'arn:aws:acm:us-east-1:123456789012:certificate/11-3336f1-44483d-adc7-9cd375c5169d';

const domainCert = certificatemanager.Certificate.fromCertificateArn(this, 'domainCert', certificateArn);
pool.addDomain('CustomDomain', {
  customDomain: {
    domainName: 'user.myapp.com',
    certificate: domainCert,
  },
});
```

## Properties

- `certificate`: [ICertificateRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_certificatemanager.ICertificateRef.html) (required) — The certificate to associate with this domain.

- `domainName`: string (required) — The custom domain name that you would like to associate with this User Pool.
