pending_dns to serving your published website with a primary-domain redirect.
Prerequisites
- An API key with
full_editoraccess or higher — see Create an API key - A published website — see the Quickstart
- Custom domains enabled for the website by an organization owner in the dashboard (Site settings, Domains); enabling adds the site to the plan and the owner confirms the charge first, see Plans and limits
- Access to the domain’s DNS records at your registrar or DNS provider
1
Create the domain
POST /v1/websites/{websiteId}/domains claims the hostname and returns the DNS records you must create. A website can hold up to 10 custom domains.Add a custom domain
Response (truncated)
Apex domains like
example.com receive an A record instead of a CNAME; subdomains like www.example.com receive a CNAME. Always use the exact values from your response — do not copy values from this page.2
Add the DNS records at your provider
Create every record in
dnsRecords at your DNS provider using the returned values. For record names, some providers accept the fully qualified name while others automatically append your domain and want only the host label (for example _cactal.www). Check how your provider handles fully qualified names.You may proxy the hostname through Cloudflare, Fastly, or another CDN instead of exposing the returned routing value in public DNS. Keep the ownership TXT record unchanged and configure the proxy to forward site requests, including /_framework/*, to the Cactal edge.DNS changes propagate in minutes at most providers, but TTLs up to 48 hours are possible. You can continue to the next step immediately; verification retries are safe.3
Verify until the domain is active
POST /v1/websites/{websiteId}/domains/{domainId}/verify re-checks ownership, certificate state, and whether HTTPS traffic reaches the matching Cactal domain.Check verification
Cactal also re-checks automatically: every 60 seconds for the first 2 hours, every 5 minutes for the first day, then every 15 minutes. A domain that never verifies is removed after 7 days. Call verify manually whenever you want an immediate answer.
Repeat verify until the response shows
"status": "active" and "failureMessage": null. Then https://www.example.com serves your published website.4
Set the primary domain
The first custom domain to become active is promoted to primary automatically. To choose a different one:Only
Set primary
active custom domains can be primary; anything else returns 409. The response is the domain with "isPrimary": true. All other production hosts — the platform subdomain and any other custom domains — redirect to the primary.5
Verify the redirect
Request the platform subdomain and confirm the redirect to your primary domain:List all domains for the website anytime with
Test the redirect
You should see
HTTP/2 308 with location: https://www.example.com/. Paths and query strings are preserved on the redirect.GET /v1/websites/{websiteId}/domains. Remove one with DELETE /v1/websites/{websiteId}/domains/{domainId}; if it was primary, the oldest remaining active custom domain is promoted.Troubleshooting
Next steps
- Domains concepts for platform subdomains, preview hosts, and SSL
- Preview drafts and versions to review changes before they reach your domain