# Custom domains

> Connect a domain you own to a published website. The records to add, how verification works, and how to fix common problems.

A published website lives at `yourname.buildpad.site`. With a custom domain it lives at a domain you own instead, like `twoends.com`. You add one or two DNS records at the company that manages your domain, Buildpad checks them and gets the certificate, and the site answers on your domain.

*The custom domain dialog shows the records to add and ticks each one off as it is found.*

## Who can use it

Custom domains need an active plan, and your trial counts. Without one, the **Use a custom domain** link in the publish popover opens the plans dialog instead. See [Plans](https://buildpad.io/docs/plans).

## Adding a domain

1. Open the publish popover from the website's status pill and click **Use a custom domain**. The link is also on Buildpad's publish card once a site is live.
2. Type the domain and click **Add domain**. Leave out `https://` and any path. `twoends.com`, `www.twoends.com` and a subdomain like `shop.twoends.com` all work.
3. Add the records shown at your DNS provider. Buildpad looks up where your domain's DNS is managed and names the provider in the instructions when it recognizes it.
4. Wait for the status to reach **Active**. Changes usually show within a few minutes.

You can add the domain before the site is published. Visitors see the not published page on your domain until you publish.

## Bare domains and subdomains

- A **bare domain** like `twoends.com` is served at `www.twoends.com`. The bare name redirects there, so both reach the site. A bare name can only hold an address, not a pointer to Buildpad, which is why it needs two records.
- A **subdomain** like `shop.twoends.com` is served exactly as typed and needs one record.

Buildpad shows the domain without `www`, and the published address becomes `https://www.twoends.com`.

## The records

| Type  | Name                       | Value                 | Needed for   |
| ----- | -------------------------- | --------------------- | ------------ |
| CNAME | `www`                      | `cname.buildpad.site` | Bare domains |
| A     | `@`                        | `178.156.216.23`      | Bare domains |
| CNAME | the subdomain, like `shop` | `cname.buildpad.site` | Subdomains   |

Some providers want the full name, `www.twoends.com`, instead of `www`, and `@` means the domain itself. Use the copy button next to each value in the dialog.

Buildpad reads the records from your domain's own nameservers, so a record you just saved shows up on the next check instead of after caches expire.

## Statuses

*A domain moves from Pending to Active. Error means something needs your attention.*

| Status        | Meaning                                                                                                                  |
| ------------- | ------------------------------------------------------------------------------------------------------------------------ |
| **Pending**   | The CNAME record has not been found yet.                                                                                 |
| **Verifying** | The record is in place and the certificate is being issued, usually within a few minutes.                                |
| **Active**    | The domain is live with a certificate. For a bare domain the dialog still reminds you if the A record is missing.        |
| **Error**     | The certificate could not be issued or the domain was blocked. Check the records, or remove the domain and add it again. |

The status also shows as a chip next to the domain in the publish popover.

## Checking

The dialog checks on its own every 15 seconds while it is open, and Buildpad re-checks every domain every 5 minutes in the background. **Check** runs a check right away. After one, the button reads **Checked just now** for a short while.

## Removing a domain

Open the dialog and click **Remove domain**, then **Remove** to confirm, or **Keep**. The site goes back to its `buildpad.site` address, which keeps working alongside the custom domain the whole time. A website has one custom domain: adding another replaces it, and a domain can be connected to only one website.

## Troubleshooting

- **The site loads on `www` but not on the bare domain.** Look for an AAAA record on the bare domain and remove it. The dialog notes this when it sees one next to the A record.
- **Your registrar already forwards the bare domain to `www`.** That counts as the A record, so you can leave the forwarding in place.
- **Typos.** The CNAME value is exactly `cname.buildpad.site`, with no `https://` and nothing after it. Check for a stray space or a missing letter.
- **Nothing changes after adding the records.** Give it a few minutes and click **Check**. If your provider shows the record but Buildpad does not find it, make sure it is on the right domain and that an older record with the same name was removed.
- **It says to use the address field.** Names ending in `buildpad.site` are not custom domains. Change them in the publish popover instead.
- **That domain is used by another website.** Remove it from the other website first.
- **Error status.** Remove the domain and add it again. If it comes back, the records are usually the cause.

## When a subscription ends

The website is paused and visitors on your domain see the paused page, but the domain stays connected. When a plan is active again the site resumes on your domain with nothing to redo. If you want the domain for something else in the meantime, remove it from the dialog.

> **Tip:** Add the domain before the site is finished. The records and the certificate take a few minutes to settle, so by the time you publish the domain is already Active.
