> **Experimental**
>
> `@aws-cdk/aws-amplify-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# DomainOptions

Options to add a domain to an application.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/domain.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-amplify-alpha/lib/domain.ts#L16)

## Example

```ts
declare const amplifyApp: amplify.App;
declare const main: amplify.Branch;
declare const dev: amplify.Branch;

const domain = amplifyApp.addDomain('example.com', {
  enableAutoSubdomain: true, // in case subdomains should be auto registered for branches
  autoSubdomainCreationPatterns: ['*', 'pr*'], // regex for branches that should auto register subdomains
});
domain.mapRoot(main); // map main branch to domain root
domain.mapSubDomain(main, 'www');
domain.mapSubDomain(dev); // sub domain prefix defaults to branch name
```

## Properties

- `autoSubdomainCreationPatterns`: string[] — Branches which should automatically create subdomains.

  **Default:** all repository branches ['*', 'pr*']

- `customCertificate`: [ICertificate](/cdk/api/v2/docs/aws-cdk-lib.aws_certificatemanager.ICertificate.html) — The type of SSL/TLS certificate to use for your custom domain.

  **Default:** Amplify uses the default certificate that it provisions and manages for you

- `domainName`: string — The name of the domain.

  **Default:** the construct's id

- `enableAutoSubdomain`: boolean = false — Automatically create subdomains for connected branches.

- `subDomains`: [SubDomain](/cdk/api/v2/docs/@aws-cdk_aws-amplify-alpha.SubDomain.html)[] — Subdomains.

  **Default:** use `addSubDomain()` to add subdomains
