Cloudflare Pages is a static and JAMstack hosting platform that builds websites directly from a Git repository or an uploaded folder and serves the resulting files from Cloudflare’s global edge network. In hosting for servers and web applications, it represents the serverless model: there is no machine to manage, no web server to configure and no capacity to plan, because every deployment is distributed to data centers worldwide.
The service combines continuous deployment, automatic HTTPS, preview URLs for every branch and optional server-side logic through Pages Functions. It competes directly with Netlify, Vercel and GitHub Pages, and it is closely tied to the Cloudflare Workers runtime, which powers its dynamic features.
How Cloudflare Pages builds and deploys a site
Cloudflare Pages turns a source repository into a globally distributed, immutable deployment in a sequence of automated steps. A push to a connected GitHub or GitLab repository triggers a build in an isolated container, where the configured build command runs and produces an output directory such as dist or public.
The platform then uploads the output to its edge storage, hashes each file and assigns a unique deployment URL. Because deployments are immutable, a rollback simply points the production domain back to an earlier build, which takes seconds and requires no rebuild.
The following table lists the three main ways to create a deployment.
| Method | How it works | Best suited for |
|---|---|---|
| Git integration | Builds on every push to GitHub or GitLab | Teams using pull requests |
| Direct Upload | Uploads a prebuilt folder in the dashboard | Simple sites and quick tests |
| Wrangler CLI | Deploys from a terminal or CI pipeline | Custom build systems and automation |
Branch deployments are a core part of the workflow. Every non-production branch and pull request receives its own preview address on the pages.dev domain, so reviewers can check changes in a real environment before they reach the production branch.
Pages Functions and dynamic capabilities
Pages Functions add server-side code to an otherwise static site by running JavaScript or TypeScript on the Cloudflare Workers runtime. Files placed in a functions directory become routes automatically, so a file named functions/api/contact.js handles requests to /api/contact.
Functions run in V8 isolates rather than containers, which gives cold starts measured in milliseconds but also imposes limits on CPU time, memory and available Node.js APIs. Functions can bind to other Cloudflare services such as the KV key-value store, the D1 database and R2 object storage.
| Aspect | Static assets | Pages Functions |
|---|---|---|
| Execution | None, files served from cache | Code runs per request at the edge |
| Typical latency | Very low, served from nearby location | Low, plus processing time |
| Billing model | Requests generally free | Counted against Workers request quotas |
| Typical use | Pages, images, scripts, styles | Forms, authentication, API proxies |
Behavior at the edge can also be configured without code. A _redirects file defines URL redirects and rewrites, and a _headers file sets response headers such as security policies or cache control directives for chosen paths.
Comparison with other hosting models
Cloudflare Pages belongs to the static site hosting category and differs fundamentally from shared hosting, virtual servers and managed WordPress hosting. It suits sites that can be prebuilt into files, while applications that need a persistent server process or a traditional relational database on the same machine fit other models better.
| Option | Server management | Dynamic code | Typical fit |
|---|---|---|---|
| Cloudflare Pages | None | Edge functions | Static sites, JAMstack front ends |
| GitHub Pages | None | Not supported | Documentation and project pages |
| Netlify or Vercel | None | Serverless and edge functions | Framework-based web applications |
| Shared hosting | Provider-managed | PHP and databases | Small CMS websites |
| Virtual private server | Full responsibility | Any language or service | Custom back ends |
Its main differentiator is that static asset bandwidth is not metered on the free plan, while some competitors charge for bandwidth beyond a quota. In recent years Cloudflare has also extended Workers to serve static assets, and new full-stack projects are increasingly directed there, so teams should evaluate both products when starting a new application.
Limits, plans and configuration choices
Cloudflare Pages enforces build and file limits that shape how large projects are structured. The exact values depend on the plan and change over time, so the figures below describe the general order of magnitude rather than a contractual guarantee.
| Constraint | Approximate value | Practical impact |
|---|---|---|
| Builds per month | About 500 | Frequent pushes may need batching |
| Concurrent builds | 1 | Builds queue during busy periods |
| Files per deployment | About 20,000 | Large media libraries need R2 |
| Maximum single file size | About 25 MiB | Videos and archives belong elsewhere |
| Custom domains | Supported with automatic TLS | No certificate management needed |
Correct build configuration prevents most failed deployments. The framework preset, build command, output directory and environment variables must match the project, and the Node.js version should be pinned through an environment variable or a version file so builds remain reproducible.
Risks and common mistakes
Most problems with Cloudflare Pages come from misunderstanding the static model rather than from platform failures. Teams migrating from traditional servers sometimes expect behavior that a file-based edge platform does not provide.
- Exposed preview deployments can leak unreleased content unless access is restricted with Cloudflare Access.
- Secrets in client bundles become public, because anything in the build output is downloadable.
- Wrong output directory settings produce empty or broken deployments without an obvious error.
- Single-page application routing fails on deep links unless a fallback rule or framework adapter is configured.
- Vendor lock-in grows when Functions rely heavily on proprietary bindings such as KV or D1.
In everyday language
Cloudflare Pages is a way to put a website online without renting or running a server. A developer keeps the website files in an online folder, and every time something changes, Cloudflare rebuilds the site automatically and copies it to hundreds of locations around the world.
Think of it like a newspaper printed once and delivered to every corner shop at the same time, instead of one central kiosk where everyone has to queue. Visitors get the copy closest to them, so pages load quickly almost everywhere.
Seen in the real world
A small software company maintains a product documentation site with about 1,500 pages generated by a static site generator. It previously ran on a single virtual server in one region, and readers in Asia and South America reported load times above three seconds.
The team connects the documentation repository to Cloudflare Pages, sets the build command and output directory and adds the company subdomain with automatic TLS certificates. Writers now open pull requests and share the preview link with product managers before merging.
After the migration, typical page loads fall well under one second in all regions, the virtual server is retired and hosting costs for the site drop to nearly zero. A short Pages Function forwards the feedback form to the support ticketing system, replacing the old PHP script.