Skip to content

Custom domains

A deployment answers on two Convex addresses: its .convex.cloud URL serves the client API your functions are called through, and its .convex.site URL serves HTTP actions. A custom domain serves one of the two from a hostname you own.

Custom domains need the Convex Professional plan. Below it, a deploy fails with VanityDomainsDisabled.

yield* Convex.CustomDomain("Api", {
deployment,
domain: "api.example.com",
requestDestination: "convexCloud",
});

convexCloud serves the API, and convexSite serves HTTP actions. Changing any prop replaces the domain.

Functions see the default URL until you set a canonical URL.