---
title: Custom domains
description: "Attach your own hostname to a deployment: the DNS records, verification, and TLS issuance."
---

Every project is served at `https://<name>.<username>.<platform-domain>`, for example `https://hello.ada.fn.example.com`. A project needs one deploy before it can take a custom domain. To add your own hostname:

1. **Add the domain**

    ```sh npm
    npx sproutboat domains add example.com
    ```

    ```sh pnpm
    pnpm sproutboat domains add example.com
    ```

    ```sh bun
    bunx sproutboat domains add example.com
    ```

    ```sh yarn
    yarn sproutboat domains add example.com
    ```

    It prints two records to create in your DNS:

    | Type | Name | Value | Notes |
    | --- | --- | --- | --- |
    | `TXT` | `_sproutboat.example.com` | `sproutboat-verify=<token>` | proves you control the zone |
    | `A` or `AAAA` | `example.com` | the server address it prints | **DNS-only, not proxied.** Routes the name to the server. |

2. **Verify**

    ```sh npm
    npx sproutboat domains verify example.com
    ```

    ```sh pnpm
    pnpm sproutboat domains verify example.com
    ```

    ```sh bun
    bunx sproutboat domains verify example.com
    ```

    ```sh yarn
    yarn sproutboat domains verify example.com
    ```

    Verify checks the TXT record. If the hostname does not resolve to the server yet, it still verifies but warns; re-run it once DNS has propagated.

:::note
Caddy issues the TLS certificate on the first HTTPS request. Inside the platform's own domain, only the bare domain and its `www` name can be attached. After verification you can remove the TXT record; the address record must stay.
:::

## Related

- [CLI reference: domains](/docs/reference/cli#configure)
- [Platform limits](/docs/platform/limits): custom domains per project
