Overview
Custom domains can't be edited once they're created, in the dashboard or through the API. To change a domain's settings or move it to another upstream, you delete it and create it again right away. Done this way, visitors won't notice.
This applies to the host, the challenge type (HTTP-01 or DNS-01), Redirect to www, Prepend Path, and which upstream the domain belongs to.
đĄ Bubble Settings are the exception. You can change a Bubble domain's target path, title, description, favicon and social image any time on its Bubble Settings tab. See Bubble Settings.
Change settings or move to another upstream
Write down the domain's current settings.
Delete the domain from its upstream.
Straight away, create it again with the new settings, under the same upstream or a different one.
A domain can belong to only one upstream at a time, so you can't create the new one before deleting the old one.
If your user's DNS records stay the same, the domain keeps working. Our proxies pick up the change within a minute or two.
Some changes need new DNS records. Switching to DNS-01 needs the _acme-challenge record, and turning on Redirect to www needs a record for www too. Have your user add them first, or that part won't work until they do.
Using the API
The API has no update endpoint for custom domains either. Send two requests, one right after the other:
DELETE /api/v1/accounts/:account_uuid/upstreams/:upstream_uuid/custom_domains/:domain_uuidPOST /api/v1/accounts/:account_uuid/upstreams/:upstream_uuid/custom_domainswith the new settings, using the new upstream's UUID if you're moving it.
The new domain gets a new UUID, so save it in your database. See the Custom Domains API docs.
Moving all domains to a new server
If every domain on an upstream should go to a new server, don't move the domains. Edit the upstream instead and change its host, port or TLS setting. All its custom domains stay attached and start using the new settings. Upstreams can only be edited in the dashboard, not through the API.
Suspended domains
Suspended domains can't be deleted. Message us if you need to change one.
Until next time, keep building!
Need more help? Reach out via the Intercom chat widget and we'll be right with you!