Cloudflare
Cloudflare

Cloudflare Pages vs Workers: When to Use Which

February 11, 2026·5 min read

Both Pages and Workers deploy on Cloudflare's network, but they're optimized for different use cases. Pages is for static sites and frontend—Git integration, builds, and CDN distribution. Workers is for compute—running your code on every request.

Pages builds your static assets (Next.js, Hugo, Gatsby), then serves them from the edge. Zero config for most frameworks. Workers runs any JavaScript—APIs, proxies, transformers, background jobs. Pages can also run functions via Functions mode, essentially Workers with framework support.

For most web apps: Pages for the frontend, Workers for the API. Keep them separate or unify under a single domain with routes. Production sites often use both, with Workers proxying API calls but Pages handling the marketing site.

Picklist may earn commission when you purchase through our affiliate links.