Skip to content

MKI

Astro dropped Cloudflare Pages, so your deploy target needs to move

The Astro Cloudflare adapter no longer supports Pages, and Cloudflare's own docs now steer new projects to Workers. Here is what to change.

If you deploy an Astro site to Cloudflare Pages, the ground has moved. Since @astrojs/cloudflare version 13 — the version Astro 6 requires — the adapter no longer supports deploying to Pages at all. Astro’s own docs now say it plainly: “the Astro Cloudflare adapter no longer supports deployment on Cloudflare Pages. For the best experience and feature support, you should migrate to Cloudflare Workers.” Cloudflare’s side of the story lines up with that: its migration guide, last updated August 14, 2026, treats Workers with static assets as the default for anything new, with Pages left in a support-only lane.

None of this is a sudden outage. It is the kind of change that sits quietly in a changelog until someone runs npm update, ships the new adapter, and finds their Pages project can no longer build. We build and maintain Astro sites for clients, so this is exactly the sort of dependency shift we track before it becomes a Monday-morning surprise.

What changed

Cloudflare Workers picked up native static-asset hosting in September 2024, which meant a single Worker could finally serve HTML, CSS, JS, fonts, and images the way Pages always had, plus everything Workers already did on the compute side — Durable Objects, Cron Triggers, queue consumers, and proper request-level observability. By March 2026, that parity was complete enough that Cloudflare stopped treating it as an alternative and made it the recommendation: start new projects on Workers, and Pages is where things go to be maintained rather than developed.

Astro followed. @astrojs/cloudflare@13.0.0, released the same month, dropped the workerEntryPoint option Pages relied on and removed Pages support outright, a change that ships by default with Astro 6. The adapter has kept moving since — it’s at 14.2.5 now — while Cloudflare’s own Pages deployment guide for Astro was still pointing developers at the old workflow as recently as late April, when a Cloudflare docs contributor filed an issue flagging the mismatch. Cloudflare’s documentation caught up on August 14, folding the gap closed.

Put together, three separate parties converged on the same answer inside of five months: the framework, the platform, and the platform’s own docs. That kind of alignment is a reasonable signal that Pages for Astro is not coming back into favor.

Why Cloudflare made the call

The short version, from Cloudflare’s own migration guide: Workers can do everything Pages does — free static asset requests, the same pricing for compute — plus a materially longer feature list. The compatibility matrix Cloudflare publishes alongside the migration guide spells out the gap directly. Pages lacks Cron Triggers, queue consumers, Logpush, source maps, real Workers Logs, rate-limiting bindings, and the Vite plugin. Maintaining two deploy targets with diverging capability sets is expensive for a platform team, and Cloudflare chose to stop doing it rather than backport every new Workers feature into Pages indefinitely.

For teams building content sites, that trade barely registers day to day. For teams whose Astro project has grown a server-rendered checkout flow, a webhook handler, or anything that leans on Durable Objects, it’s the difference between a supported path and a dead end.

There’s also a practical reason this isn’t just Cloudflare tidying up its own product line. Pages and Workers grew up as genuinely separate products inside Cloudflare, with separate teams, separate dashboards, and separate mental models for how a request gets routed. Every new capability that shipped to Workers first — Smart Placement, the observability stack, the newer bindings for D1, Vectorize, and Hyperdrive — had to be either reimplemented for Pages or explicitly decided against. Kenton Varda, who leads the Workers runtime, put it plainly when the adapter change landed: the plan is to take Pages-specific features and fold them into Workers as general capabilities, rather than keep maintaining two parallel serving models. Once that consolidation was far enough along, keeping a second, more limited deploy target around stopped paying for itself.

What breaks if you don’t move

If a project still targets Pages and someone bumps @astrojs/cloudflare past v12, or upgrades to Astro 6 or 7, the build itself is what fails — not a runtime error days later. That’s the good news: this isn’t a silent regression, it’s a loud one, and it surfaces in CI before it reaches production. The less good news is that “loud in CI” still means a blocked deploy on whatever day you happened to touch the lockfile, which is a bad time to first learn your hosting adapter changed its mind about where it deploys.

Two other things worth knowing before you touch the config:

  • The default imageService changed from compile to cloudflare-binding in the same release wave. If your build depended on compile-time image transforms for prerendered routes, set imageService: 'compile' explicitly, or you’ll get correct-looking images that are now resized at request time through a binding instead.
  • Environment-specific deploys changed shape too. Astro 5’s wrangler deploy --env some-env pattern no longer applies as-is; since the integration moved onto the Cloudflare Vite plugin, the environment is fixed at build time, so you build once per environment and prefix the build command with CLOUDFLARE_ENV rather than choosing the environment at deploy time.

How you’d notice, if you weren’t looking

Most teams don’t read every framework changelog line by line, which is fair — a dependency update usually just works. This one is a good example of why it’s worth at least skimming the majors. The failure mode here is not a broken page in production; it’s npm install && npm run build failing in CI the next time someone touches package.json, with an error about a missing or unrecognized workerEntryPoint option, or a Wrangler complaint about a Pages-shaped config that Workers doesn’t understand. If your CI is set up the way ours is — lint and build gating the merge — you’ll see it before it ships. If a project auto-deploys straight from a merge to main without a build gate, the first sign might be a failed deploy notification instead, which is a worse place to learn about it.

Either way, the fix is the same: it’s a configuration and tooling change, not a rewrite of your Astro code. The pages and components you’ve already written don’t change; what changes is the wrapper around them.

The migration in practice

The move from Pages to Workers is mechanical, not architectural — you are not rewriting the app, you’re changing how it’s packaged and served. Cloudflare’s migration guide covers it end to end, but the shape of it is:

Replace whatever build-output configuration you had for Pages with a wrangler.jsonc that points assets.directory at your build output (./dist/client/ for a typical Astro + Cloudflare adapter setup), and set compatibility_date to the current date if you weren’t pinning one already.

{
"name": "my-astro-app",
"compatibility_date": "2026-09-01",
"assets": {
"directory": "./dist/client/",
},
}

Decide how 404s should behave — Pages guessed based on the presence of 404.html or index.html; Workers wants that stated explicitly via not_found_handling, either "single-page-application" or "404-page".

Swap wrangler pages dev / wrangler pages deploy for wrangler dev / wrangler deploy in your scripts, and if you’re on a Vite-powered setup, the Cloudflare Vite plugin can simplify local development further.

If you had Pages Functions in a functions/ folder, compile them into a single Worker script with wrangler pages functions build --outdir=./dist/worker/ as an interim step, or — better, if you have the time — let your framework’s Workers adapter generate the entry point directly, which is what @astrojs/cloudflare already does for you.

_headers and _redirects files in your public/ folder carry over unchanged; Workers with static assets reads them the same way Pages did.

Reconnect CI through Workers Builds instead of Pages’ built-in Git integration, then disable automatic deployments on the old Pages project once the new one is live, and delete the Pages project only after you’ve confirmed traffic has moved.

None of this needs downtime. Custom domains, _headers, _redirects, and your framework adapter all carry across; the parts that need actual decisions are the 404 behavior and, if you use one, your CI provider’s build hook.

A rollback plan is worth having anyway. Keep the existing Pages project running and untouched while you stand up the Worker alongside it — Cloudflare doesn’t require you to tear down one before deploying the other. Point a preview URL or a staging subdomain at the new Worker first, run through your usual smoke tests (forms submit, redirects fire, images resize correctly if you use image transforms), and only cut the production domain over once you’ve watched it under real traffic for a day or two. If something’s wrong, DNS points back at the Pages project in minutes, and you’ve lost nothing but the afternoon.

What we’d do about it

For a new Astro project on Cloudflare, this isn’t a decision anymore — npx astro add cloudflare on a current Astro version deploys to Workers, full stop, and there’s no Pages path to accidentally pick.

For an existing Pages deployment, we’d treat this the way we treat any dependency migration with a hard deadline hiding in it: don’t wait for a routine npm update to force the issue during a release window. Do the migration deliberately, on a branch, with the build passing before you touch the DNS. Budget an afternoon for a typical marketing or content site — most of that time goes to reading the compatibility matrix for anything unusual your Pages Functions did, not to writing new code.

If your site is served from a plain VPS or another host rather than Cloudflare — as ours is — none of this touches you directly. But it’s worth knowing the shape of the change if a client asks why their Cloudflare-hosted Astro site suddenly won’t build, or if you’re weighing hosts for a new web development project and Cloudflare’s edge network is on the shortlist. Get in touch if you want a second pair of eyes on a migration like this before you ship it.

Sources