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.
api.example.comcustom domain
site.example.comcustom domain
proddeployment
client APIconvexCloud
HTTP actionsconvexSite
Custom domains need the Convex Professional plan. Below it, a deploy fails with VanityDomainsDisabled.
Add a domain
Section titled “Add a domain”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.
Make it canonical
Section titled “Make it canonical”Functions see the default URL until you set a canonical URL.