Developer

Edge routing and custom domains

Routes customer domains through the Apex Worker path for edge-managed experiences and SSL-for-SaaS style storefront handling.

Simple terms

Edge routing sends a customer domain through Apex's Cloudflare Worker when a flow needs proxy-level control.

Routes customer domains through the Apex Worker path for edge-managed experiences and SSL-for-SaaS style storefront handling.

Routes

  • /installation
  • /installation/edge-routing

Implementation behavior

  • Custom hostnames can CNAME to edge.drip-apex.com so traffic enters the Cloudflare Worker.
  • The Worker resolves the shop/domain, applies routing rules, and proxies or handles configured paths.
  • Fallback origins and hostname validation prevent unverified traffic from being treated as a trusted shop domain.
  • Runtime config keeps edge routing separate from normal SDK-only installs.

How to use it

  • Use edge routing only when a storefront flow requires Worker mediation rather than SDK-only DOM changes.
  • Validate DNS and custom hostname status before switching traffic.
  • Keep origin settings current for each shop domain.
  • Test preview and production domains separately.

When not to use it

  • Do not use edge routing for ordinary DOM-only A/B tests that the SDK can handle.
  • Do not route production domains before DNS validation and origin testing are complete.
  • Do not mix Vercel domain ownership and Cloudflare custom hostname routing without checking which edge receives traffic.

Implementation source

  • Worker code lives in packages/worker and Cloudflare routes are documented in project configuration.
  • Dashboard install and edge pages use server-side domain-routing and edge-resolution services.
  • Cloudflare custom hostnames and shop origin fields determine how requests are resolved.

Data and API

  • Cloudflare Worker routes, custom hostname records, shop origin fields, and edge-routing verification state.
  • Dashboard capabilities cover hostname discovery, DNS preflight, custom-hostname configuration, verification, and runtime resolution without exposing internal service paths.
  • Worker observability is the main debugging source for edge routing.

Failure modes

  • Hostname not active: DNS CNAME or validation TXT is missing.
  • Origin loop or blank response: wrong origin field or Vercel/domain conflict.
  • SDK works but edge route does not: these are separate deployment paths and must be verified independently.