This setup keeps the frontend pointed at subdomains you control while Kuest services stay behind a Cloudflare proxy.
1
Create proxied DNS records
In Cloudflare Dashboard > Your Domain > DNS > Records, create the CNAME records below and keep Proxy ON.
relayer.yourdomain.com→relayer.kuest.comclob.yourdomain.com→clob.kuest.comdata-api.yourdomain.com→data-api.kuest.comuser-pnl-api.yourdomain.com→user-pnl-api.kuest.comcommunity.yourdomain.com→community.kuest.comcreate-market.yourdomain.com→create-market.kuest.comgamma-api.yourdomain.com→gamma-api.kuest.comprice-reference.yourdomain.com→price-reference.kuest.comgeoblock.yourdomain.com→geoblock.kuest.comsdk-download.yourdomain.com→sdk-download.kuest.comws-live-data.yourdomain.com→ws-live-data.kuest.comws-subscriptions-clob.yourdomain.com→ws-subscriptions-clob.kuest.com
2
Create the Cloudflare Worker
In Workers & Pages, create a Worker and paste this script after replacing
yourdomain.com.3
Attach Worker routes
In Worker > Settings > Triggers > Routes or Domains & Routes, add these routes:
relayer.yourdomain.com/*clob.yourdomain.com/*data-api.yourdomain.com/*user-pnl-api.yourdomain.com/*community.yourdomain.com/*create-market.yourdomain.com/*price-reference.yourdomain.com/*geoblock.yourdomain.com/*sdk-download.yourdomain.com/*ws-live-data.yourdomain.com/*ws-subscriptions-clob.yourdomain.com/*
4
Update production environment variables
In your hosting provider, point the app to your new subdomains:
Keep these exact environment variable names. The frontend already exposes them to the client through
next.config.ts.After this setup, users stay on your domain while traffic is proxied to the Kuest services behind Cloudflare.