EvaE
Convex Community2y ago
27 replies
Eva

Setting up a custom domain

I'm having trouble following the docs to understand the process of setting up a custom domain for my Convex site. I'm using Cloudflare Pages, and the build and deploy part are working, but the app displays a white page with a console error reading:

Uncaught Error: ConvexReactClient requires a URL like 'https://happy-otter-123.convex.cloud'.


- In my
.env.local
,
VITE_CONVEX_URL
is set to a URL ending in
.convex.cloud
. Do I update this to my production URL? Do I also need to add it to
.env
?
- Are there settings in the Convex dashboard I need to modify?
- In the Convex dashboard, for Development deploys, in Settings > Environment Variables, I have a
SITE_URL
set to
http://localhost:5173
. In Production deploys there is no
SITE_URL
defined. Do I need to add
SITE_URL
to Production Environment Variables with my production URL?
- How do I handle preview deploys for Convex with Cloudflare Pages?

I've read through the Custom Domains & Hosting docs page but I'm still unclear on the steps. Thanks for any help :)
Serve requests from any domains and host your frontend on any static hosting provider, such as GitHub.
Custom Domains & Hosting | Convex Developer Hub
Was this page helpful?