Before You Start
This page lists what your SaaS team should prepare before integrating Custom Domain Kit.
Accounts and Access
- A Custom Domain Kit account with dashboard access.
- Permission to create applications and webhook endpoints.
- Permission to manage billing if you plan to unlock domain limits.
SaaS Application Requirements
Your product needs:
- A stable HTTPS origin URL, such as
https://app.example.com. - A customer or workspace identifier that will become
tenantId. - A current user or service identity that can become
actorId. - A settings page where customers manage custom domains.
- A server endpoint that can sign setup sessions.
- A server endpoint that can receive webhook deliveries.
Test Domain Requirements
Prepare a subdomain you control, for example:
docs.customer-example.comUse a real DNS provider for the test. Localhost and private hostnames are not useful for validating customer DNS behavior.
Data You Should Store
Store these fields in your product database:
| Field | Why it matters |
|---|---|
hostname | Lets your runtime map custom-domain traffic to a tenant. |
domainId | Lets your server update or delete the matching Custom Domain Kit domain. |
tenantId | Connects the hostname to your customer account or workspace. |
status | Lets your product show current setup state. |
lastWebhookEventId | Lets your webhook receiver ignore duplicate deliveries. |
Decisions to Make First
- Which product plans can use custom domains?
- Which users can manage domains for a tenant?
- Which origin URL should customer traffic reach?
- Will you start in hosted mode or connect your own Cloudflare account?
- How will support staff see a tenant's hostname and status?
