• Oct 23, 2026
  • 3 min read

Cloudflare Pages Projects Are Now Workers: What Changed for a Static Site

I’ve deployed several static sites to Cloudflare Pages with the same two commands. This time, with wrangler 4.149, the result was different enough to write down.

What happened

npx wrangler pages project create my-site --production-branch main

Instead of a classic Pages project:

  • the site was deployed as a Worker with static assets, on my-site.<account>.workers.dev;
  • wrangler printed a notice that this is “the latest version of Cloudflare Pages, now part of Cloudflare Workers”, recommending wrangler deploy for future deployments, with --force to get the previous kind of project;
  • it wrote a wrangler.jsonc whose main pointed at dist/_worker.js/index.js, a file that doesn’t exist in a static build;
  • it edited my Astro project: added @astrojs/cloudflare (a server adapter) to astro.config.mjs and package.json, plus a public/.assetsignore.

The site worked, but my static site now had a server adapter it didn’t need.

So is Cloudflare Pages deprecated?

Not in the sense of “stop using it”. What I saw is a change of default: wrangler now calls Workers with static assets “the latest version of Cloudflare Pages”, and new projects get that unless you pass --force. My existing Pages projects kept building and deploying exactly as before, Git builds and deploy hooks included. The practical question is which kind of project you’re creating, and whether it adds anything to a static site you don’t want. The rest of this post is that.

What I reverted

The adapter exists for server-rendered Astro. A fully static site gains nothing from it but a server bundle and complexity, so:

git checkout -- astro.config.mjs package.json package-lock.json
rm public/.assetsignore

Then I rebuilt and checked that dist/ had no _worker.js.

The config that works

{
  "name": "my-site",
  "main": "worker/index.js",              // optional: only for the canonical-host redirect
  "compatibility_date": "2026-10-06",
  "assets": {
    "directory": "dist",
    "binding": "ASSETS",
    "html_handling": "auto-trailing-slash",  // /privacy -> /privacy/
    "not_found_handling": "404-page",        // without it, unknown paths got a 301
    "run_worker_first": true                 // only needed with the redirect worker
  },
  "routes": [
    { "pattern": "www.example.com", "custom_domain": true },
    { "pattern": "example.com", "custom_domain": true }
  ]
}

Without not_found_handling, an unknown path answered with a 301 to a slash version instead of a 404: the soft-404 problem again, the one that once hid hundreds of broken links. _headers from the build still applied, including when the files are served through the worker.

What it changes for domains

The bigger practical difference: Workers custom domains need the domain’s DNS on Cloudflare. A classic Pages project could serve a www subdomain from DNS hosted elsewhere, with a CNAME. Here, the domain moved to Cloudflare first, keeping its email records, and then the routes above created DNS records and certificates on deploy (the full domain checklist is the next post).

Pages or Workers for a static site?

Classic Pages projectWorkers static assets
Created bywrangler pages project create (older), or with --forcewrangler pages project create (4.149), wrangler deploy
ConfigDashboard / _headers, _redirectswrangler.jsonc + _headers, _redirects
LogicPages FunctionsYour own worker script
Domain on external DNSwww by CNAMENot supported: DNS on Cloudflare
FitsExisting projects, external DNSNew projects, everything in one config file

My existing sites stay as they are. For new ones, the single config file is an improvement, once you know what to remove.

Takeaways

  • wrangler pages project create may give you a Worker now. Check what it created.
  • Read the diff before committing; it edited my project.
  • Static sites don’t need the server adapter.
  • Set not_found_handling: "404-page" to keep real 404s.
  • Custom domains need DNS on Cloudflare; plan the email records first.