# GetPranks: ColdFusion to Static Pages in 2 Days | gen2.dev

> A first-hand account of moving 11 prank storefronts, online since 2005, off IIS, ColdFusion and SQL Server onto static Cloudflare Pages and D1 in two days.

Source: https://gen2.dev/cases/getpranks/

---

Case file 37 · First-hand account

# GetPranks: a 20-year ColdFusion storefront moved to the edge

Eleven prank-gift storefronts, the oldest online since 2005, ran on one Windows server with IIS, ColdFusion and SQL Server. Bots and crawlers were hammering it. In two days it moved to pre-rendered pages at the edge, and the old server was never touched.

![Slide: one server running IIS, ColdFusion and SQL Server, then static pages at the edge on Cloudflare Pages and D1, in two days. Eleven storefronts moved in one evening, and the old server stayed untouched as the rollback.](https://gen2.dev/img/case-getpranks.png)

These are my sites. GetPranks.com and its ten sister storefronts sell prank gifts. They have been online since 2005, and they have always been a reseller: a visitor finds a product with us and buys it from a partner.

This was not a small "sell some Amazon stuff" site. Over 20 years it grew real features, and every one of them had to come along.

## Gen 1

One Windows server, rented as a VPS, ran everything: IIS as the web server, ColdFusion for the pages and SQL Server for the data. Fifteen domains once shared the one codebase, each with its own logo and theme. The source lived in Subversion.

Every page was built on request. To keep the database from melting, ColdFusion cached query results for 24 hours, and the admin had a page whose whole job was to clear that cache on demand. Product images lived on the server's own disk.

The database at the end held 188,436 rows across 64 categories, including 167,660 rows of buy-click tracking and 20,050 logged searches.

## What the site really did

**Twenty years of partners.** The products have always come from third-party sellers, and those partners changed many times over the years. At the peak I had more than 13 different sellers at once. Today it is Amazon only.

**Product feeds from partners.** Several of those companies sent their catalogs as CSV feeds. The admin had a custom importer for them, because the data was garbage: broken fields, inconsistent columns, missing values. It fetched each product's images from the advertiser and stored them on the server, so a partner's slow or vanished image host never broke a page.

**Adding an Amazon product in one step.** A lot of code existed only to automate adding an item. An admin-only Chrome extension sent the Amazon page to the admin, which fetched the product details, built the product record and its short URL, and filed it in a category. The extension was localhost-only for development, and it came over to the new version too (more below).

**The home page follows the calendar.** The site works out which holiday is coming next and reorders itself around it: the categories and every item on the home page shift to that holiday, with no one touching it. The old code had nine seasonal windows. A prank site that shows summer stock at Christmas is losing money.

**An analytics admin of its own.** Every buy click was logged with its referrer, browser and visitor, and the admin turned that into maps, demographics and custom graphs of clicks, customers and trends: which items were rising, which were falling, which domains and categories earned their keep.

**Search that learns.** Every search was logged with its result count, and an admin-only synonym table sent common misspellings to the right results.

## Why it had to change

**Bots.** AI crawlers and search crawlers were hitting the home page and walking every one of the roughly 15,000 pages, and each hit was a ColdFusion request against one server. The buy-tracking page alone was later measured at about 4,900 requests a day, and the bot check rejected 62% of them.

**Drift.** The list of domains was hard-coded in four places: the application file, the buy page, the structured data and `robots.txt`. They had drifted apart. The bot detection logic existed twice, and those copies had drifted too.

**Security debt.** The old admin had a category delete that ran on an unauthenticated GET request, so a single crawled link could erase a whole catalog section. Another admin page was an SQL console guarded by two text patterns.

**A server to look after,** with Windows updates, IIS, ColdFusion, SQL Server and backups, for sites whose content changes a few times a week.

## The plan

The content is almost static. Products are added a few times a week; everything else is reading. So the plan was to stop building pages on request at all:

-   **Pre-render every page for every domain at build time,** one folder per domain, and serve them as static files from Cloudflare Pages.
-   **Move the data to Cloudflare D1,** the edge database, which the build reads.
-   **Keep code only where it must run per request:** the buy click (it logs a row and redirects to the seller) and the search and error beacons. Everything else is a file.
-   **Move the source from Subversion to GitHub,** so every push is a deploy.
-   **Retire four of the fifteen domains** rather than carry them over.

## What made the URLs safe

The riskiest part of a storefront move is not the code. It is the URLs that search engines already know. About 2,585 item URLs were indexed, built by a ColdFusion function that turned product names into slugs.

So the first commit, on August 5, 2026, ported the two functions that define the public contract before anything else:

-   **The slug builder,** as an exact port, including a single-pass collapse of double spaces that a cleaner rewrite would have changed. Its parity test runs 160 cases, 100 of them real indexed production URLs.
-   **The bot check,** all 13 of its rules, with 82 test cases taken from the old site's own test pages.

Both test suites were generated from the old code, not typed by hand. These are [characterization tests](https://gen2.dev/guide/characterization-tests/): they record what Gen 1 does, odd behavior included, and hold Gen 2 to it.

The domain list became one file, and the build fails if the list and the cache-purge list disagree. The bot check became one module, shared by every place that needs it.

## Moving the data

The SQL Server database was restored locally and exported to D1. Two things in that export would have corrupted data without anyone noticing:

-   **Emoji.** Category names contain emoji, and the export tool silently replaced them with question marks unless it was forced into UTF-8.
-   **Statement size.** D1 rejects any single SQL statement over 100 KB, far below SQLite's own limit, and product rows carry full HTML descriptions. A 200-row insert reached 201 KB and failed. The exporter now caps statements by size, with an assertion so it cannot regress.

Verification compared more than row counts: sums of the click and view counters (`SUM(BuyCount)` matched at 2,085,067), the highest IDs, and a sample of 200 product names re-run through the slug builder. Row counts alone would pass even if every string had been mangled.

## Cutover

The [big bang cutover](https://gen2.dev/guide/big-bang-cutover/) happened on the evening of August 6, 2026, one day after the first commit, for all 11 domains at once. What made a big bang acceptable was that the rollback was cheap and certain:

-   **DNS for all 15 zones was backed up first.** That backup was the rollback.
-   **The old server was never modified.** It kept serving until each domain's DNS moved, and it would have resumed the moment DNS moved back.
-   **A canary went first:** the lowest-traffic domain was taken all the way through attach, DNS, rewrite rules and full verification before the other ten.

Each domain's DNS moved from the server's address to the Pages project, and a rule per domain mapped requests into that domain's pre-rendered folder. 154 checks passed across the 11 domains.

The check that mattered most was one that looked fine either way. If the folder-mapping rule had run before the buy route, every buy click would have been rewritten into a static path, the tracking Function would never have run, and every page would still have looked perfect. The checks proved a real click still created a tracking row.

Two things went differently from the runbook. The `www` names needed no work, because every zone already redirected them before any origin was consulted. And the final delta sync was skipped on purpose: the local database was a restore from the day before, and I decided two days of click and search history were not worth the extra step. Those rows are still on the old server.

## The features, rebuilt

-   **The Chrome extension moved into the browser.** The old extension sent only a URL, and the server fetched and scraped the Amazon page. Amazon blocks requests from Cloudflare's addresses, so that cannot work from the edge. The new extension reads the product page in my own browser: the title, price, images, brand, feature bullets and description, each found by a list of fallback selectors because Amazon lays out books, toys and apparel differently. I review every field, it checks for a duplicate, and one click adds the item. It authenticates with a Cloudflare Access service token instead of calling an open API.
-   **Adding a product** is two steps now. The database write is instant, so the product's buy link works at once. Its static page appears after a rebuild that the admin triggers automatically: all 11 domains are re-rendered and deployed in roughly three to five minutes.
-   **The holiday logic** still runs, but the choice of holiday is made in the visitor's browser. The build pre-renders the items for every seasonal window, so a build made in July still shows the right holiday in December.
-   **The analytics admin** came across as a fixed set of reports: totals against the previous period, unique and returning visitors, top and trending items, categories, domains and a daily trend. The pasted-SQL console did not.
-   **Images:** the old upload-to-disk page was retired. The 699 product images the old site served were copied into the project as static files, and new products use Amazon's image URLs.
-   **Bots meet static files.** A crawler walking every page now reads files from the edge instead of starting ColdFusion requests. The Functions that do run are on an allowlist, and the build fails on any file outside it, because each new Function would bill on every request it matches.
-   **The buy counter stopped counting bots** on August 16, 2026. With 62% of buy-page requests coming from bots, the counter had been ranking crawler interest, not people's.

## Why Cloudflare Pages, D1 and R2

-   **Free to start.** Static requests on Pages cost nothing, however many crawlers come. D1's free tier allows 5 GB of storage, 5 million rows read and 100,000 rows written a day. GetPranks writes about 15,000 rows on a normal day, mostly click logging, and its database is about 96 MB.
-   **Why I ended up paying.** Pages Functions and Workers share one account-wide allowance, 100,000 requests a day on the free plan. I moved the account to Workers Paid, $5 a month, on September 20, 2026. The trigger was another of my projects: the free plan's 10 millisecond CPU limit was silently killing one of its background jobs. The paid plan also raises the shared request allowance to 10 million a month, so a crawler storm on one site cannot use up another site's quota.
-   **Global caching.** Every page is a file on Cloudflare's network, served from the location nearest the visitor. There is no origin server left to overload.
-   **A faster experience for customers.** Pages arrive already built, so there is no database query and no ColdFusion render between the click and the page.
-   **Better deployments.** A push to GitHub builds and deploys all 11 domains. Every deploy gets its own URL, and rolling back is choosing an earlier deploy.
-   **AI-friendly.** Each domain publishes a `robots.txt` that names the AI crawlers and lets them read everything but the API, plus an `llms.txt` that lists the categories and points at the sitemap. The whole build is plain files in one repository, which makes changes and enhancements, by a person or an AI coding assistant, quick to make, test and deploy.
-   **R2 when it is needed.** R2 is Cloudflare's object storage and charges nothing for data going out. GetPranks did not need it in the end: the old images were few enough to ship as static files, and new products use Amazon's image URLs. It is there for the day a partner feed brings its own images again.

## What made it work

-   **The URL contract was ported first, with tests generated from Gen 1.** Everything else could change because that could not.
-   **The content was static in nature,** so the right Gen 2 was not a new server but no server.
-   **The rollback was the old system, untouched.** A big bang is only reckless when going back is hard.
-   **A canary on the smallest domain** found the problems on the site that mattered least.
-   **Gen 1's quirks were treated as findings, not trivia.** The emoji and the 100 KB limit would each have corrupted data quietly.

## What to take from it

-   **Ask whether Gen 2 needs a server at all.** Content that changes a few times a week can be built once and served as files, even when the admin behind it is large.
-   **Port the contract before the code.** For a public site that is the URLs; prove them with tests taken from the old system.
-   **List every feature before you plan the move.** Twenty years of importers, extensions, seasonal logic and reports are the real size of a Gen 1, not its page count.
-   **Verify data with sums and samples, not counts.**
-   **Keep Gen 1 running and unmodified until Gen 2 has carried real traffic.** That is what made one evening enough.

## Source

**First-hand account.** Written by RJ Lindelof about his own sites: he owns GetPranks.com and its sister storefronts and directed the migration. Dates, counts and measurements come from the project's own repository, changelog and cutover runbook; the history and the old features are from his own account.

Last updated November 29, 2026.

## Scorecard

Worked

Gen 1

11 storefront domains on one VPS: IIS, ColdFusion and SQL Server, product images on the server's disk, every page built per request behind a ColdFusion query cache, plus 20 years of admin tools

Gen 2

Every page for every domain pre-rendered as a static file on Cloudflare Pages, data in Cloudflare D1, and Functions only for the few paths that must run code

Approach

Port the parts that define the public contract first, with parity tests, then cut every domain over in one evening behind a canary and a DNS rollback

How long

Two days: the first commit on August 5, 2026 and all 11 domains cut over on August 6

Verdict

It worked. The old server kept running untouched as the rollback, and was never needed.

## More case files

-   [Netscape 6](https://gen2.dev/cases/netscape-6/)
-   [Python 2 to 3](https://gen2.dev/cases/python-2-to-3/)
-   [Firefox Quantum](https://gen2.dev/cases/firefox-quantum/)
-   [Perl 6 and Raku](https://gen2.dev/cases/perl-6-raku/)
-   [AngularJS to Angular](https://gen2.dev/cases/angularjs-to-angular/)
-   [Windows Longhorn](https://gen2.dev/cases/windows-longhorn/)
-   [Digg v4](https://gen2.dev/cases/digg-v4/)
-   [Twitter to the JVM](https://gen2.dev/cases/twitter-jvm/)
-   [Basecamp](https://gen2.dev/cases/basecamp/)
-   [IPv4 to IPv6](https://gen2.dev/cases/ipv6/)
-   [VB6 to VB.NET](https://gen2.dev/cases/vb6-to-vb-net/)
-   [HTTP/2 and HTTP/3](https://gen2.dev/cases/http-2-and-3/)
-   [K-12 browser rewrite](https://gen2.dev/cases/k12-browser-rewrite/)
-   [Mac OS X](https://gen2.dev/cases/mac-os-x/)
-   [Microsoft Edge](https://gen2.dev/cases/edge-chromium/)
-   [Winamp3](https://gen2.dev/cases/winamp3/)
-   [Slack desktop](https://gen2.dev/cases/slack-desktop/)
-   [Evernote 10](https://gen2.dev/cases/evernote/)
-   [Uber rider app](https://gen2.dev/cases/uber-rider-app/)
-   [HealthCare.gov](https://gen2.dev/cases/healthcare-gov/)
-   [Thunderbird Supernova](https://gen2.dev/cases/thunderbird-supernova/)
-   [Skype](https://gen2.dev/cases/skype-cloud/)
-   [Sonos app (2024)](https://gen2.dev/cases/sonos-app-2024/)
-   [FBI Virtual Case File](https://gen2.dev/cases/fbi-virtual-case-file/)
-   [LinkedIn Inversion](https://gen2.dev/cases/linkedin-project-inversion/)
-   [Netflix to AWS](https://gen2.dev/cases/netflix-cloud-migration/)
-   [TSB migration](https://gen2.dev/cases/tsb-migration/)
-   [Phoenix pay system](https://gen2.dev/cases/phoenix-pay/)
-   [Universal Credit](https://gen2.dev/cases/universal-credit/)
-   [Queensland Health payroll](https://gen2.dev/cases/queensland-health-payroll/)
-   [Facebook for iOS](https://gen2.dev/cases/facebook-native-ios/)
-   [New Microsoft Teams](https://gen2.dev/cases/microsoft-teams-2/)
-   [Dropbox to Python 3](https://gen2.dev/cases/dropbox-python-3/)
-   [Instagram to Python 3](https://gen2.dev/cases/instagram-python-3/)
-   [Discord Go to Rust](https://gen2.dev/cases/discord-go-to-rust/)
-   [Reddit Redesign](https://gen2.dev/cases/reddit-redesign/)
-   [37signals cloud exit](https://gen2.dev/cases/37signals-cloud-exit/)
-   [IRS Individual Master File](https://gen2.dev/cases/irs-individual-master-file/)
-   [All case files](https://gen2.dev/cases/)
