Infra May 10, 2026 7 min read

Vercel to Cloudflare Pages Migration. Why We Moved 7 Client Sites in 5 Days

The bandwidth bill that broke the camel's back, the 5-step playbook we used, and the three things that broke on the way over.

Vercel to Cloudflare Pages Migration. Why We Moved 7 Client Sites in 5 Days

We migrated 7 client sites from Vercel to Cloudflare Pages over 5 days in May 2026. The trigger: a Vercel bandwidth bill that 4x'd quarter-over-quarter while traffic only doubled. Here's the comparison, the migration playbook, and what broke.


Vercel vs Cloudflare Pages — the 2026 reality

For three years, Vercel was the default for every Next.js site we shipped. The DX is genuinely excellent. Preview deployments, Git integration, instant rollbacks, and a frontend cloud that just works. We have no complaints about the product. We have complaints about the bill.

The fundamental difference between Vercel and Cloudflare Pages in 2026 comes down to bandwidth economics. Vercel meters and charges for bandwidth, function invocations, image optimization requests, edge middleware executions, and ISR revalidations. Cloudflare Pages meters none of that on its free tier and charges a flat $5 per month for the Workers paid plan with generous request limits.

Vercel's Hobby tier caps you at 100GB of bandwidth per month. Pro starts at $20 per user per month with 1TB included, then charges $0.40 per additional GB. Cloudflare Pages includes unlimited bandwidth on the free tier and 500 builds per month at no cost. That single line item is enough to move most static and near-static sites by itself.

The pricing pages tell the story directly. Vercel's pricing is metered across multiple dimensions. Cloudflare Pages is effectively flat for the vast majority of workloads.


Why Vercel got expensive fast

The trap with Vercel is that costs compound across dimensions you do not watch. Here is what happened to one of our client accounts between January and April 2026.

Bandwidth overage. Traffic doubled from organic search and a viral LinkedIn post. The bandwidth bill went from $0 to $640 in a single month because the included 1TB on Pro tipped over at 2.6TB actual usage. That is $0.40 per GB on every byte beyond the threshold, with no warning escalation built in.

Image optimization. Vercel charges per source image and per transformation. A site with 200 hero variants serving 80,000 unique visitors burned through the included quota in 11 days. The overage was $5 per 1,000 source images plus optimization request fees.

Function invocations. Edge middleware ran on every request to check geolocation and apply A/B test flags. At 2.6TB of traffic that translated to roughly 18 million invocations. Past the included quota, edge middleware is charged separately from regular serverless invocations.

ISR revalidations. Each on-demand revalidation costs a function invocation. A content-heavy site triggering revalidation on every CMS update can quietly accumulate thousands of paid invocations daily.

The total bill for that one client in April was 4x what we paid in January. Traffic only doubled. The non-linear cost growth is the real problem with Vercel at scale, not the absolute numbers.


Cloudflare Pages advantages

Cloudflare Pages was built on top of Cloudflare's existing CDN, which serves a meaningful percentage of all web traffic globally. That foundation changes the economics of everything they ship on top of it.

The Workers platform underneath Pages is the strategic moat. Pages is essentially a frontend wrapper around the same compute primitives that power everything else Cloudflare ships. You can move from a static Pages site to a fully dynamic application without changing platforms.


The migration playbook

Here is the exact 5-step process we used for each of the 7 sites. Average time per site was 45 minutes, with the slowest taking 2 hours due to a custom edge middleware rewrite.

Step 1: Export or connect the site. For static Next.js exports, we ran next build && next export and uploaded the output directory directly. For sites we wanted to keep building from Git, we connected the existing GitHub repo to Cloudflare Pages and configured the build command and output directory.

Step 2: Create the Pages project via wrangler. The CLI command wrangler pages project create <name> sets up the project in seconds. We scripted this for the 7-site migration so each project was created with consistent build settings and environment variables pulled from a shared config.

Step 3: Point the custom domain. For zones already on Cloudflare DNS, the dashboard adds the domain in one click and provisions SSL within 60 seconds. For external DNS we added a CNAME to <project>.pages.dev and let Cloudflare provision the certificate via HTTP validation.

Step 4: Configure _headers and _redirects. These two files at the project root replace the Vercel-specific vercel.json configuration. We set cache-control headers for static assets at one year, HTML at five minutes, and SPA redirects for client-routed apps. The syntax is Netlify-compatible, which made the rewrite mechanical.

Step 5: Verify SSL and edge cache behaviour. After DNS propagation we ran a checklist: SSL grade A on SSL Labs, edge cache HIT on second request, correct Cache-Control headers, no mixed content warnings, and HTTP/3 enabled. Five minutes per site to verify everything.

For one client running headless WordPress with ISR, we used the @cloudflare/next-on-pages adapter and rewrote two API routes to Pages Functions. That site took the full 2 hours. The other 6 were faster than 45 minutes each.


What broke

Three things broke on the way over. None were dealbreakers, all were solvable, but they deserve honest mention.

Next.js ISR does not fully work on Cloudflare Pages without an adapter. On-demand revalidation through res.revalidate() is not natively supported. We worked around this by either pre-rendering everything at build time or moving to a stale-while-revalidate pattern using Cloudflare's edge cache directives. For one truly ISR-dependent site we considered staying on Vercel before deciding to refactor to a static export with webhook-triggered rebuilds.

Vercel-specific edge functions need rewriting. Edge middleware using Vercel's NextRequest and NextResponse APIs does not run as-is on Pages Functions. The rewrite is straightforward, since Pages Functions use the Workers fetch handler signature, but anything beyond trivial geolocation logic took meaningful engineering time.

Vercel KV and Blob storage migration. One client used Vercel KV for session storage. We migrated to Cloudflare KV with a one-time export-import script. Vercel Blob mapped cleanly to R2, which is S3-compatible, so the asset migration was an aws s3 cp loop. Total downtime: zero for both, since we ran both stores in parallel until cutover.


Cost numbers

Across the 7 sites we migrated, the monthly Vercel bill was tracking toward $1,840 in May before the move. After migration:

ComponentVercel (May projected)Cloudflare Pages (May actual)
Team seats$60$0
Bandwidth overage$720$0
Function invocations$340$0 (under free tier)
Image optimization$280$0 (Cloudflare Images: $0)
Edge middleware$180$0
KV/Blob$160$5 (Workers paid)
ISR revalidations$100N/A (static + webhooks)
Total$1,840$5

That is $1,835 per month in annualised savings, or roughly $22,000 per year, on the same 7 sites. The engineering time to migrate was 14 hours across all sites combined. Break-even versus our hourly rate was inside the first week.

This is why every new client site we ship now goes directly to Cloudflare Pages. Read more about our services and how we approach infra decisions. For a related case study on speed-to-deploy, see how we built a full Etsy shop in 48 hours with AI agents.


FAQ

Is Cloudflare Pages cheaper than Vercel?

Yes, in almost every realistic SMB scenario. Cloudflare Pages includes unlimited bandwidth on its free tier and 500 builds per month. Vercel's Hobby tier caps bandwidth at 100GB and charges $0.40 per additional GB on Pro. For a static or near-static site at 500GB monthly transfer, Cloudflare costs $0 and Vercel costs roughly $160. With Workers paid plan at $5 per month, Cloudflare still beats Vercel Pro at $20 per seat plus overages.

Can I run Next.js on Cloudflare Pages?

Yes, but with caveats. Static export Next.js sites run cleanly. Full SSR, ISR, and Edge API routes require the @cloudflare/next-on-pages adapter, and some features like on-demand revalidation and Image Optimization need rework. For most marketing and SaaS landing sites we ship as static or use the adapter. For heavy ISR-dependent apps we either rewrite or stay on Vercel.

How do I migrate from Vercel to Cloudflare Pages?

Five steps: (1) Export the production build or connect your Git repo, (2) Create a Cloudflare Pages project via wrangler pages project create, (3) Point your custom domain at Cloudflare with a CNAME or full nameserver delegation, (4) Configure _headers and _redirects for caching and SPA routing, (5) Verify SSL provisioning and edge cache behaviour. Full migration for a static site typically takes 30 to 90 minutes per site.

Does Cloudflare Pages support edge functions?

Yes, via Cloudflare Pages Functions, which are Workers running at the edge. You write them as TypeScript or JavaScript files in a /functions directory and they execute on Cloudflare's global network in under 50 milliseconds cold start. They support fetch, KV, D1, R2, and Durable Objects natively. Vercel edge functions need to be rewritten to the Pages Functions API, but the mental model is identical.

Stuck on a Vercel bill that keeps growing?

We migrate sites to Cloudflare Pages in days, not months. Free 30-minute scoping call. Email michaelmartina@linkaiagency.com.

Book a Free Call →