Custom domains

Every space has a default subdomain at <your-space-slug>.unfolder.space. You can also serve a space from an arbitrary apex/subdomain (e.g. portfolio.example.com) powered by Cloudflare for SaaS.

How it works

The platform terminates TLS for your hostname via Cloudflare for SaaS. You point DNS at the platform's edge with a single CNAME and the platform issues a certificate.

The platform's fallback origin is self.unfolder.space. That's the only DNS target you ever need.

The workflow

  1. Pick a hostname. It must be one you control DNS for.

  2. Add the CNAME at your DNS provider:

    portfolio.example.com.   CNAME   self.unfolder.space.
    

    For an apex/root domain, use a CNAME-flattening, redirects or ALIAS record if your DNS provider supports one; otherwise use a subdomain.

  3. Register the hostname via the MCP tool:

    set_custom_domain({ slug, hostname: "portfolio.example.com" })
    

    This calls Cloudflare for SaaS to create the custom hostname and stores the value on the space row in Platform's database. Once the cert is issued, requests to your hostname route to the same production facet as <your-space-slug>.unfolder.space.

  4. Check status with:

    get_custom_domain({ slug })
    

    The response includes Cloudflare-side hostname + SSL validation status. Common states:

    • pending — DNS not yet propagated or cert still issuing
    • active — live
    • moved / deleted — DNS was changed away from self.unfolder.space
  5. Remove when you no longer want it:

    remove_custom_domain({ slug })
    

    This deletes the Cloudflare for SaaS hostname and clears the Database column. The default <your-space-slug>.unfolder.space URL keeps working.

Notes

  • Only one custom hostname per space. Calling set_custom_domain again replaces the previous one (and cleans up the old Cloudflare for SaaS entry).
  • The hostname is normalized to lowercase. Duplicate registrations across different spaces are rejected.