Why I Deploy Static Sites to Cloudflare Pages (And Why I Left Other Hosts Behind)
Static sites don't need a server. HTML, CSS, JS, and images. Serve them fast and call it done.
I've deployed two sites to Cloudflare Pages now: course.coach and ricsmo.com. Both are Next.js static exports. The workflow is identical for both. Push, build, deploy. Same steps every time.
How It Works
Cloudflare Pages deploys straight from GitHub. Push to main and it builds and deploys automatically. Push to any other branch and it creates a preview deploy with a unique URL. No FTP, no SSH, no manual steps.
The build environment is fast. Next.js static export on Cloudflare's builders completes in under two minutes for a site with 30+ pages.
The free tier includes unlimited bandwidth, unlimited requests, and 500 builds per month. That's hard to beat.
Preview Deploys
Preview deploys are the feature I didn't know I needed. Every pull request gets its own URL. You can share it with someone for review without touching production.
This replaced the need for a staging environment. I don't have to maintain a separate deployment for testing. Branch, push, review on the preview URL, merge when ready.
Custom Domains
Custom domains are one-click. Point your DNS to Cloudflare (or use Cloudflare DNS, which is what I do), add the domain in Pages, done. SSL is automatic. No certificate management, no renewal dates, no email reminders.
What I Left Behind
I used Bunny Magic Containers for NotaryStyle. Docker is great for apps that need a runtime, like a database connection or server-side logic. But for static sites, running a Docker container is overkill. You're paying for compute you don't use.
Before that, NotaryStyle was on shared hosting. PHP, cPanel, plugin updates, security patches. Static sites have none of that overhead. No PHP version to maintain. No plugin compatibility matrix. No backup scripts for MySQL.
I've also used VPS setups where you manage everything yourself. Updates, security, backups, monitoring. Cloudflare handles all of it.
The Catch
There's a catch with static export. No server-side features. No dynamic routes, no API routes, no server-side image optimization. Everything has to be generated at build time.
RSS feeds, sitemaps, OG images all need to be build scripts that write static files, not API routes. I run all of mine as part of the build pipeline: generate the OG images, optimize other images, build the RSS feed, build the sitemap, then run next build.
But for a blog or marketing site, you don't need server-side features. Build it once, serve it forever.
The Stack
Both course.coach and ricsmo.com use the same setup: Next.js with output: "export", Tailwind CSS, MDX content, Cloudflare Pages. Push, build, deploy.
When I want to add a new blog post, I create an MDX file, commit it, and push. Cloudflare builds the site including the new OG image, the updated RSS feed, the updated sitemap, and deploys it. No manual steps in between.
That workflow is hard to beat for a solopreneur running multiple sites.
If you're building a consulting business and want help standing out, that's what I do. Get in touch.