Skip to content

Connect your domains

Once your domain is an Active zone in the amabledata Cloudflare account, you can put amabledata on your own hostnames. This page explains the different hostnames, which Worker each one points to, and the DNS records involved.

amabledata uses up to five kinds of hostname. Only the sending domain is required (and only for marketing email); everything else can stay on workers.dev addresses.

Hostname Example Served by What it is for Required?
App hostname crm.example.com amable-core The dashboard, the REST API, OAuth callbacks, links in system emails No (default: amable-core.<subdomain>.workers.dev)
Tracking hostname (edge origin) t.example.com amable-edge The tracker script and events, email click/open/unsubscribe links, hosted forms and booking pages No (default: amable-edge.<subdomain>.workers.dev)
Sending domain example.com or mail.example.com Your email provider The domain in the From address of marketing email, authenticated with SPF, DKIM and DMARC Yes, before any campaign is sent
Tracking domains (per site) track.example.com amable-edge First-party tracking links and tracker for one analytics site No
Landing and booking site go.example.com, or /offers on www.example.com amable-edge Published landing pages and booking pages on your hostname No

Use subdomains of one domain you own. Keep your main website (example.com, www.example.com) where it is.

  • amable-core answers people who work in amabledata (your team) and API clients.
  • amable-edge answers your visitors and contacts: tracking, public forms, booking pages, landing pages, email links. It is the one that must sit on your brand hostnames.
Method DNS record Certificate Used for
Workers custom domain Created by Cloudflare automatically, pointing at the Worker Issued automatically App hostname, tracking hostname, whole-hostname landing site
Worker route (host/path*) A proxied record must exist for the hostname The zone’s certificate Some paths of an existing website; zone-mode tracking domains
Custom hostname (Cloudflare for SaaS) A DNS only CNAME at the domain owner’s DNS provider Issued by Cloudflare CNAME-mode tracking domains on domains outside your account

A Workers custom domain cannot be created on a hostname that already has a CNAME record: delete the old record first.

On the installation page of the Cloud portal, Connect a domain asks for the App hostname (optional), the Tracking hostname (optional) and the Zone (optional). We write the DNS records (app, tracking, email SPF/DKIM/DMARC) into your zone through the API. The token you created in Create the API token is what allows this. Without a domain, the CRM starts on a workers.dev address; you can connect the domain later.

Put the dashboard on your app hostname (self-hosted)

Section titled “Put the dashboard on your app hostname (self-hosted)”
  1. In Cloudflare, go to Workers & Pages and select the Worker amable-core.

  2. Open Settings › Domains & Routes › Add › Custom domain.

  3. Enter the hostname, for example crm.example.com, and select Add Custom Domain. Cloudflare creates the DNS record and the certificate (allow a few minutes).

  4. Rerun the setup script with the new origin and your usual options:

    Terminal window
    pnpm self-host:setup --deploy \
    --app-origin https://crm.example.com \
    --edge-origin https://t.example.com
  5. Open https://crm.example.com and sign in there. From now on, links in system emails and OAuth redirect URIs use this origin: update the redirect URIs of your OAuth apps (see Optional tokens and secrets).

Put the edge Worker on your tracking hostname (self-hosted)

Section titled “Put the edge Worker on your tracking hostname (self-hosted)”
  1. In Workers & Pages, select amable-edge › Settings › Domains & Routes › Add › Custom domain.

  2. Enter the hostname, for example t.example.com, and select Add Custom Domain.

  3. Check it: https://t.example.com/health must answer {"ok":true,"worker":"amable-edge"}.

  4. Rerun the setup script with --edge-origin https://t.example.com (and your --app-origin). Tracking snippets, email links and hosted pages now use this hostname.

  1. In amabledata, go to Settings › Domains and select Connect a domain.

  2. Choose Sending domain (Required before any marketing email can be sent (SPF, DKIM, DMARC).), enter the domain, for example example.com, and select Add.

  3. amabledata asks the email provider for the records and lists them with Type, Name and Value.

  4. Create the records:

    • Automatically: select Create on Cloudflare (shown when DNS automation is configured). The records are written to the zone as DNS only.
    • Manually: in Cloudflare, open the zone › DNS › Records › Add record, and copy each record exactly. Keep them DNS only (grey cloud).
  5. Select Verify. The status becomes Verified when the provider sees the records; until then it stays Not verified (records not found yet). Sending stays blocked until the domain is verified.

Details of the sending settings: Email sending settings.

Tracking domains are managed per analytics site in Analytics settings › Domains › Add domain. Two modes:

Mode Label in the app DNS you create Requirements
Zone (recommended) Domain on this Cloudflare account (recommended) A proxied CNAME for the hostname, plus a Worker route hostname/* to amable-edge The domain is a zone of the same Cloudflare account as the edge Worker
CNAME DNS stays elsewhere (CNAME) One CNAME, not proxied, to the target shown by the app CF_ZONE_ID and CF_API_TOKEN configured (see Optional tokens and secrets)

Press Check now after creating the records. amabledata verifies a zone-mode domain by calling https://<hostname>/.well-known/amable-tracking, which only the edge Worker answers. Full guides: Tracking domains, Zone domains, CNAME domains.

  1. In Settings › Domains › Connect a domain, choose Landing & booking site.

  2. Enter the hostname. Leave Paths (optional) empty to serve the whole hostname, or list up to 10 paths (for example /offers) to route only those paths of an existing website to the edge Worker.

  3. Select Add, then:

    • whole hostname: Create on Cloudflare attaches it to amable-edge as a Workers custom domain; manually, create the CNAME shown by the app;
    • with paths: Create on Cloudflare adds the Workers Routes listed by the app (each path and path/*, plus /m/* for media, /b/* for booking and /health). Manually, add them in the zone › Workers Routes › Add route, Worker amable-edge.
  4. Select Verify. amabledata checks that the hostname answers from the edge Worker.

What Record type Name Value Proxy Created by
App hostname Workers custom domain crm Worker amable-core Automatic You in the dashboard (self-hosted) or the installer (Cloud)
Tracking hostname Workers custom domain t Worker amable-edge Automatic You in the dashboard (self-hosted) or the installer (Cloud)
Sending domain: SPF TXT the sending domain Shown by Settings › Domains DNS only The wizard (with automation) or you
Sending domain: DKIM TXT or CNAME ..._domainkey names shown by the app Shown by the app DNS only The wizard or you
Sending domain: DMARC TXT _dmarc Shown by the app DNS only The wizard or you
Tracking domain, zone mode CNAME + Worker route track + track.example.com/* Edge hostname + amable-edge Proxied You (see the tracking domain guide)
Tracking domain, CNAME mode CNAME track Target shown by the app DNS only The domain owner, at their DNS provider
Landing site, whole hostname Workers custom domain (or CNAME in manual mode) go amable-edge / edge hostname Automatic The wizard or you
Landing site, some paths Worker routes www.example.com/offers, /offers/*, /m/*, /b/*, /health amable-edge Existing proxied record The wizard or you
Status Meaning
Not verified Added, records not confirmed yet
Verified The provider (sending) or the edge Worker (tracking, site) confirmed the hostname
Verification failed A previously verified domain no longer passes the check

The progress shows the steps Added, DNS on Cloudflare (or DNS records created in manual mode) and Verified, with Last check and Last error when present.

  • Settings › Domains requires the domains:manage permission (owner and admin). Tracking domains require analytics:configure (owner, admin, marketer). See Roles and permissions.
  • A hostname can be connected to one workspace only (hostname already connected).
  • A landing site accepts at most 10 paths; /m, /b and /health are reserved.
  • Automatic DNS needs the zone to be Active in the same Cloudflare account and a token with access to it.
Symptom Cause Fix
Cloudflare refuses the custom domain A CNAME already exists on that hostname, or the zone is not in this account Delete the old record, or add the zone to the amabledata account.
no Cloudflare zone of this account covers the hostname The zone is missing, pending, or outside the token’s resources Wait for Active; check the token’s Zone Resources.
hostname already connected Another workspace (or this one) already uses it Remove it there first, or use another subdomain.
Sending domain stays Not verified Records missing, mistyped, proxied or not propagated Compare each record character by character, set DNS only, wait a few minutes and Verify again.
Sending domain: records invalid A second SPF record, or a value changed Keep one merged SPF record; recreate the DKIM records exactly.
Tracking or site domain: edge unreachable The hostname does not answer from amable-edge Check the custom domain or route points to amable-edge and that https://<hostname>/health answers.
The hostname answers, but not from the tracking worker: check the worker route. A route or record sends the hostname elsewhere Fix the Worker route hostname/* → amable-edge.
The hostname does not answer yet: check that the zone is active and the record is proxied. Zone pending or the CNAME is DNS only (zone mode) Wait for activation, turn the proxy on.
Sign-in fails after moving the dashboard You still use the old origin Open the new app hostname. The CSRF check accepts APP_ORIGIN and the origins listed in ALLOWED_ORIGINS only.