> ## Documentation Index
> Fetch the complete documentation index at: https://docs.peak.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom domain

> Open pull request previews on your own domain.

## Before you start

* Sign in to Peak as an Admin.
* Use a domain where you can add DNS records.

## Set the domain

1. Open [Previews](https://app.peak.inc/previews).
2. Open your repository.
3. Under Preview domain, enter your domain.
4. Select Save.

```text theme={null}
preview.example.com
```

Use one domain for each repository.

## Add the DNS records

Add the two CNAME records that Peak shows under Preview domain.

| Type | Name | Value |
| - | - | - |
| CNAME | The validation name that Peak shows | The validation value that Peak shows |
| CNAME | \*.preview\.example.com | edge.peakview\.now |

Set both records to DNS only. Do not proxy them.
Keep both records. Peak renews the certificate with the first one.

## Check the status

| Status | What to do |
| - | - |
| Issuing certificate | Wait. |
| Waiting for DNS | Check both records. Peak checks again every minute. |
| Live | Open your previews on your domain. |
| Failed | Remove the domain. Then add it again. |

Expect the certificate to fail if the first record is missing for 72 hours.

## Open a preview

Expect each pull request preview at its number on your domain.

```text theme={null}
https://pr-42.preview.example.com
```

Expect Peak to use this URL in the pull request comment, the GitHub deployment, and the preview URL variables.
Expect the peakview\.now URL to keep working.
Expect the default branch preview to stay on peakview\.now.

## Remove the domain

1. Open your repository in [Previews](https://app.peak.inc/previews).
2. Under Preview domain, select Remove.
3. Select Remove again.

Expect previews to stop loading on your domain.
Then delete both DNS records.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.