Most of this site is about other people's second generations. This page is about mine. It is not one big system. It is about a hundred separate ones, and that turned out to be its own kind of problem.
What Gen 1 was
Gen 1 was one Windows server. IIS served the pages, ColdFusion ran the ones that needed code, and SQL Server sat behind those. About 100 websites lived on it. Roughly one in five is plain content: pages, CSS and a little JavaScript. The rest are web applications that do their work in the browser, with a lot of JavaScript and a server that mostly hands over files. Some of those are free utilities anyone can use. Some are subscription products that bring in revenue every month.
Deploying was a commit to a Subversion repository. The commit went straight to production. There was no build step in between and nothing to catch a mistake.
The server also did a lot of work nobody had to think about. It picked the default document for a folder. It added the security headers. It answered for every site the same way. That is comfortable right up until you leave.
Why replace it
Nothing was on fire. The reasons were the ordinary ones:
- One server was one point of failure for every site at once.
- Most sites did not need an application server. The content sites are static pages, and the web applications run in the browser. Both were being delivered by a stack built to run code on every request.
- A commit was a deploy. No build meant no gate: no link check, no test run, no validation before a change went live.
- Every site was a little different. Different default file names, different file extensions, different ways of doing the same thing.
Gen 2 is a static build per site. The build produces a folder of finished files, a push to git publishes it to Cloudflare Pages, and the pages are served from the edge.
The approach: a strangler fig across a fleet
I did not move everything at once. I moved one site at a time and left the old server running the whole way through.
That is the strangler fig pattern, with one difference. The slices were not features of one system. Each slice was a whole website. Cloudflare already sat in front of both stacks, so it was the routing layer: each domain is answered by the old server or by the new platform, and moving a site changes which one.
The other rule was to try every fleet-wide change on one site first. I learned that rule by breaking it.
What broke
Almost none of these were bugs in the new platform. They were things the old server did quietly that the new one does not do, or does differently.
The default document
IIS has a configurable list of default documents. Cloudflare Pages has exactly one: index.html. A site whose home page was index.htm returned a 404 at its own front door.
So every .htm page became .html, and then every reference to it had to follow: links, canonical tags, structured data, JavaScript strings, sitemaps, redirects, even the docs. A local dev server that still served the old file name hid the problem until production.
The rule: rename all of it, then fail the build if the output still contains a single .htm file. Old public URLs get a permanent redirect. Sites that stay on the old server keep their .htm pages, because renaming them there breaks working links for no gain.
The canonical URL that disagreed with the server
Pages serves a file named about.html at /about. My canonical tags, sitemap and structured data all said /about.html. Google saw two addresses for one page, and in October 2026 Search Console started reporting pages as "Alternate page with proper canonical tag."
The rule: the canonical is the URL that is actually served. Every page is a folder with an index.html in it, every self-reference and internal link uses the directory form with a trailing slash, and the old .html address gets a 301. The build checks its own output for this.
Purging the cache before the deploy was live
The sites cache everything at the edge for 24 hours. That makes a push something less than a release: the edge keeps serving the previous HTML until the cache is purged.
Purging too early is worse than not purging. The edge refills from the old build and holds it for another 24 hours. Combine that with the next lesson and you get an outage: old HTML pointing at CSS and JavaScript files the new build had already deleted. That took one site down in July 2026.
The rule: push, wait until the deployment reports success, then purge. In that order, enforced by tooling, and no purge at all after a failed deploy.
Query strings are not cache busting
On the old stack I busted caches with a version in the query string. Edge caches and browsers are free to keep the old bytes anyway.
The rule: the build hashes each CSS and JavaScript file, renames it to include the hash, rewrites every reference, and deletes the original. Source files use the plain name. No query strings on a site's own assets.
Security headers were "the server's job"
On Gen 1 the security headers were set once, in the server's configuration, and every site inherited them. On Pages nothing sits in front of the site to do that. The platform adds a content-type protection header and a referrer policy, and that is all.
The replacement has its own traps. Header rules live in a static file with hard limits: 100 rules, and 2,000 characters per line. A line that is too long is ignored. The deploy still succeeds, and the only trace is one line in the deploy log. Two content security policies that match the same page do not override each other, either. The browser enforces only what both allow.
The rule: "handled at the server level" no longer means anything. Each build generates its headers from the site it just built, there is one owner for the policy, and a missing header is a finding.
Edge code on every request
For sites that share one build across several domains, I first used a small piece of edge code to route each hostname to its folder. It worked. It also ran on every request, and every run counted against an account-wide free limit of 100,000 requests a day, shared by all projects.
On July 11, 2026 the account hit 91% of that limit. On July 13 I moved every project that used it off edge code and onto routing rules that do not count as invocations. Daily invocations went from about 96,600 to about 1,100. The move itself broke things in production: on one site every page returned 200 while every favicon returned 404.
The rule: a static site ships zero edge code, and the build fails if any reappears. Check the sub-resources, not just the pages. Change one site, verify it, then roll out to the rest.
A version number that bumped for nothing
Each site shows a version in its footer and the build incremented it. Every build. Rebuilding an unchanged site minted a new version and a new changelog entry that described nothing.
The fix was to fingerprint the inputs that can reach the deployed output and bump only when the fingerprint moves. The first attempt had its own bug. It hashed only the first source folder it found, so on four projects a full rewrite read as "no change." Files regenerated with a timestamp had the opposite effect: the fingerprint never matched.
The rule: hash every source folder, exclude anything the clock touches, and write the new version as the last step of the build, after every gate has passed. A failed build changes nothing.
Tests that could reach the live site
With about a hundred projects built the same way, test settings get copied. A test suite with a hard-coded address can end up pointed at production, or at another project's dev server.
The rule: tests never hit live hosts. Each project derives its own local address, a guard checks the target before the suite runs, and testing a live site takes a deliberate, explicit override.
What it cost, and what stayed on Gen 1
The cost was mostly time, and it was spread across every lesson above. The lost night in July was the most expensive single item. The hosting bill is not the story: the sites themselves run on the free tier, and the account moved to a $5 a month plan in September 2026 for the few workloads that are really dynamic.
Gen 1 is still running. A handful of sites have a real ColdFusion backend and a database, and a static build cannot replace that. They stayed where they are, with their own rules. So I run two stacks, and they are not interchangeable. The first thing to check in any project is which one it lives on.
I count that as a strangler fig that stopped on purpose. The killing Gen 1 page is the part I have not finished, and running two systems is the part I live in.
What I would do differently
- Write the gates before the first migration. Most of my rules exist because something broke first. The checks for canonical URLs, file extensions and headers could have existed before site one.
- Inventory what the old server did for free. Default documents, headers and caching behavior were all invisible until they were gone.
- Canary every fleet-wide change. One site, verified, then the rest. Every time.
- Turn each lesson into a build failure immediately. A rule written in a document gets forgotten by site forty. A rule in the build does not.
- Expect Gen 3. In September 2026 I piloted moving one site from Pages to its successor on the same platform. The last, irreversible step is still waiting on a stability window. The target moves while you migrate to it.
What to take from it
- A fleet is replaced the same way a monolith is: one slice at a time, with the old system running and a way back.
- The old platform's defaults are undocumented requirements. Find them before you leave.
- Every lesson should end as an automated check, not a note.
- It is fine to stop. Some of Gen 1 may be worth keeping, as long as that is a decision and not an accident.
If you are weighing a move like this one, start with the four real options or answer the questions in Should we rewrite it?.
Last updated November 28, 2026.

