# @serverless/domain

> Easily provision custom domains for:

Latest version **6.1.0** (published 2019-10-07) · Apache license · 0 weekly downloads

## Install

```sh
npm install @serverless/domain
pnpm add @serverless/domain
yarn add @serverless/domain
bun add @serverless/domain
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 6.1.0 |
| Published | 2019-10-07 |
| First published | 2019-07-29 |
| Weekly downloads | 0 |
| License | Apache |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 55.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Serverless, Inc. |
| Maintainers | ac360, aj.stuyvenberg, dschep, eahefnawy, pmuens |

## Links

- npm: https://www.npmjs.com/package/@serverless/domain
- npm.io page: https://npm.io/package/@serverless/domain

## Dependencies (2)

- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.499.0
- [@serverless/core](https://npm.io/package/@serverless/core.md) ^1.0.0

## Recent versions

- 6.1.0 (latest) — 2019-10-07
- 6.0.8 — 2019-10-02
- 6.0.7 — 2019-10-02
- 6.0.6 — 2019-10-02
- 6.0.5 — 2019-10-02
- 6.0.4 — 2019-10-02
- 6.0.3 — 2019-10-02
- 6.0.2 — 2019-10-02
- 6.0.1 — 2019-10-02
- 6.0.0 — 2019-10-02
- 5.0.0 — 2019-09-16
- 4.0.4 — 2019-08-21
- 4.0.3 — 2019-08-21
- 4.0.1 — 2019-08-21
- 4.0.0 — 2019-08-21
- … 14 more at https://npm.io/package/@serverless/domain/versions

## README

# Domain

Easily provision custom domains for:

- Static websites hosted on AWS CloudFront & AWS S3 via the Website Component.
- APIs built via the Backend Component.

### Inputs

```yaml

domain:
  component: '@serverless/domain'
  inputs:
    privateZone: false
    domain: mywebsite.com
    subdomains:
      www: ${websiteComponentInstance}
      api: ${backendComponentInstance}
      admin: ${anotherWebsiteComponentInstance}

```

### Set-Up

First, you must purchase your domain within Route53 manually.  Then add it to the Component, as demonstrated above.

### Using With The Website Component

When used with the Website Component, the domain component will...

- Create an AWS ACM Certificate, if one does not already exists for the domain.
- Create an AWS Cloudfront Distribution that uses the AWS ACM Certificate.
- Create Records in AWS Route 53 to point your custom domain to your AWS Cloudfront Distribution.

---
_Source: https://npm.io/package/@serverless/domain · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
