# Use your own domain for a status page

Answer a status page on a name of your own domain, such as status.example.com, with the certificate of that domain.

Replace _page-id_ with the status page's id and _status.example.com_ with your name. The page keeps
answering on its own address too.

## Prerequisites

- A verified domain of your organization that covers the name: _status.example.com_ itself, or
  _example.com_ with every name one level under it (see
  [Add and verify a domain](/docs/domains/guide/add-and-verify-a-domain)).
- Permission for `monitoring:UpdateStatusPage` on the page and `domains:UseDomain` on the domain.
  In the console, also `monitoring:DescribeStatusPages` to open **Status pages**.

## Set the name

**Console**
1. Open **Status pages** and choose the page.
2. Under **Own domain**, for **Name**, enter status.example.com.
3. Choose **Save name**.

**CLI**
```sh
dcloud monitoring status-pages set-domain page-id --hostname status.example.com
```

**API**
```http
PUT /monitoring/api/status-pages/page-id/domain
{ "hostname": "status.example.com" }
```

**Terraform**
```hcl
resource "dcloud_status_page_domain" "acme" {
  status_page_id = dcloud_status_page.acme.id
  hostname       = "status.example.com"
}
```

Then point the name at the page: at your DNS provider, a `CNAME` from _status.example.com_ to the
page's own address, `<slug>.status.<domain>`. The page is served with the certificate of the domain
that covers the name, issued and renewed by Deutsche Cloud; `dcloud monitoring status-pages get-domain`
shows its state (`certificate`: `issuing`, then `active`).

A page has one own name; setting another replaces it. A name no verified domain of your
organization covers is refused with `400`, one another resource serves with `409`.

## Remove the name

```sh
dcloud monitoring status-pages remove-domain page-id
```

The name stops answering; the page's own address keeps working. Deleting the page also lets go of
the name.

## Related

- [Create a status page](create-a-status-page.md)
- [How proof and certificates work](/docs/domains/guide/how-proof-and-certificates-work)
