# Custom domain

> Serve the chat widget, the inline iframe, and the hosted chat link from your own domain (e.g. chat.yourbrand.com) — white-label, with automatic HTTPS.

On a paid plan you can serve your agent from **your own domain** — e.g. `chat.yourbrand.com` instead of `app.bookbag.ai`. The embed script, the inline iframe, and the hosted chat page all work on your domain, so the widget is fully white-label. HTTPS is provisioned automatically.

> **WHERE TO SET IT:** Open your agent → **Settings → Custom domains**. Add a domain, verify it with a DNS record, then point it to Bookbag with a CNAME.

## Set it up

1. **Add your domain** — In Settings → Custom domains, enter e.g. chat.yourbrand.com and click Add domain.
2. **Verify ownership (TXT)** — Add the shown TXT record — host _bookbag.<your-domain> with value bookbag-verification=bb-<your-agent> — at your DNS provider, then click Verify. Bookbag checks the record live.
3. **Point traffic (CNAME)** — Add a CNAME from your domain to cname.bookbag.ai. Once it propagates, your domain serves the widget.
4. **Use it** — The dashboard shows your white-label embed snippet and hosted-chat URL on the domain. HTTPS is issued automatically on first visit.

## What runs on your domain

- **Embed script** — `<script src="https://chat.yourbrand.com/widget/embed" data-agent-id="…"></script>`.
- **Inline iframe** — `https://chat.yourbrand.com/widget/frame`.
- **Hosted chat** — visiting `https://chat.yourbrand.com/` opens your agent's chat directly.

> **TIP:** Bookbag only issues a TLS certificate for a domain after you've verified it, so no one else can point a domain at us and serve your agent.
