# Help center and custom domains

Serve self-hosted help centers on wildcard subdomains or customer CNAME domains with automatic Let's Encrypt TLS.

Out of the box, every help center is available at `https://support.example.com/hc/<subdomain>`. You can also enable dedicated subdomains and let workspaces bring custom domains with automatic HTTPS.

## Serve help centers on subdomains

Add a wildcard `A` record (such as `*.help.example.com`) pointing at your server, then enable base-domain routing and on-demand Caddy certificates:

```bash
dimmictl set <<'EOF'
DIMMI_HELP_CENTERS__BASE_DOMAIN=help.example.com
DIMMI_CUSTOM_DOMAINS__DEFAULT=edge
DIMMI_CUSTOM_DOMAINS__TLS__EDGE__DRIVER=caddyask
EOF
```

A help center with slug `acme` then answers at `https://acme.help.example.com`.

## Allow workspace custom domains

Workspaces can connect [custom domains](/help-center/custom-domain/) like `help.acme.example` by pointing a `CNAME` record at your server target:

```bash
dimmictl set <<'EOF'
DIMMI_CUSTOM_DOMAINS__DEFAULT=edge
DIMMI_CUSTOM_DOMAINS__TLS__EDGE__DRIVER=caddyask
DIMMI_HELP_CENTERS__CUSTOM_DOMAIN_TARGET=support.example.com
EOF
```

If you leave `DIMMI_HELP_CENTERS__CUSTOM_DOMAIN_TARGET` empty, it defaults to `custom.<base domain>` when a base domain is set, or to your app's own hostname.

- **Target DNS:** give the target hostname an `A` record pointing to your server.
- **Open ports:** ports 80 and 443 must reach Caddy for all hostnames, not only your app domain.
- **Subdomains only:** workspaces cannot use apex domains (like `acme.example`) because apex domains cannot hold a `CNAME`.

## How on-demand TLS works

On the first request for a hostname, Caddy asks dimmi whether it belongs to a valid help center subdomain or verified workspace custom domain. If approved, Caddy issues a Let's Encrypt certificate automatically.

Without both `DIMMI_CUSTOM_DOMAINS__*` settings enabled, dimmi rejects certificates for every hostname except your main app domain.

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
