# A website, SPA or PWA

> A marketing site or a front-end app. Nicolas Dao's picks for this job (Cloudless Labs, Sydney), in order of preference, what he would avoid, and what to use instead.

- Use case 5 of 21 in The Stack, last reviewed 21 October 2026
- Web page: https://cloudlesslabs.com/stack/use-cases/website/

Picks, in order of preference:

1. **[Cloudflare static hosting](https://cloudlesslabs.com/stack/cloudflare-static-hosting/index.md)** (My default): Deploys from GitHub on every push. Static requests are free.
2. **[Cloudflare R2](https://cloudlesslabs.com/stack/cloudflare-r2/index.md)** (Use when it fits (Proposed: research-backed, not yet confirmed by Nic)): Heavy media and downloads with zero egress fees.
3. **[Astro on Cloudflare Workers](https://cloudlesslabs.com/stack/astro-on-workers/index.md)** (Use when it fits): When some pages must be rendered on request: content sites, docs, catalogs.
4. **[Next.js on Cloudflare Workers (OpenNext)](https://cloudlesslabs.com/stack/nextjs-on-workers/index.md)** (Use when it fits): When it's a Next.js app that needs server rendering, without moving to Vercel.
5. **[Cloudflare Turnstile](https://cloudlesslabs.com/stack/cloudflare-turnstile/index.md)** (My default): Any form: Turnstile keeps the bots out, a Worker checks it and Resend sends the email.

Don't:

- ~~Amazon CloudFront~~: Not for a public site you can host anywhere. You'd assemble S3, origin access, a certificate and cache invalidations to get what Cloudflare gives you from a GitHub push, and pay-as-you-go egress can turn a viral page into a real bill where Cloudflare charges nothing. CloudFront stays right for all-AWS clients and private AWS origins. Instead: [Cloudflare static hosting](https://cloudlesslabs.com/stack/cloudflare-static-hosting/index.md).

## The picks in brief

- [Cloudflare static hosting](https://cloudlesslabs.com/stack/cloudflare-static-hosting/index.md): My default. Every website I run. Static builds deployed from GitHub on every push to main. Easy, reliable, nearly free. Pricing: Static asset requests are free and unlimited. Storing the files costs nothing. Only requests that run Worker code are billed, under Workers pricing (Workers Paid starts at $5 a month).
- [Cloudflare R2](https://cloudlesslabs.com/stack/cloudflare-r2/index.md): Use when it fits (Proposed: research-backed, not yet confirmed by Nic). Zero egress fees. The answer for public files served at volume. Keep data lakes in S3. Pricing: $0.015/GB-month, writes $4.50 per million, reads $0.36 per million, internet egress $0. Serving 20 TB a month from 2 TB stored: R2 ≈ $44 vs S3 + CloudFront ≈ $2,158 (or ≈ $228 on CloudFront's Business flat-rate plan). Free each month: 10 GB, 1M writes, 10M reads. Infrequent Access: $0.01/GB-month, $0.01/GB retrieved, 30-day minimum. Deletes are free.
- [Astro on Cloudflare Workers](https://cloudlesslabs.com/stack/astro-on-workers/index.md): Use when it fits. The framework I'd pick for content sites that need server rendering. Static by default, server-rendered where a page needs it, and owned by Cloudflare, so Workers is its home. Pricing: Free (MIT). You pay Workers pricing for the pages rendered on request; static pages are free on Cloudflare.
- [Next.js on Cloudflare Workers (OpenNext)](https://cloudlesslabs.com/stack/nextjs-on-workers/index.md): Use when it fits. Server-rendered Next.js without Vercel. The OpenNext adapter runs a normal Next.js build on Workers: SSR, ISR, server actions, middleware and image optimisation. Pricing: Workers pricing: Workers Paid is $5 a month with 10M requests and 30M CPU milliseconds included. ISR pages cache in R2.
- [Cloudflare Turnstile](https://cloudlesslabs.com/stack/cloudflare-turnstile/index.md): My default. Anti-bot for every form: a CAPTCHA replacement most visitors never notice, free and unlimited. With a Worker and Resend, it's a contact form with no form service at all. Pricing: Free: unlimited challenges, up to 20 widgets per account, 10 hostnames per widget. Enterprise adds unlimited widgets and removes the branding.

## Related

- [Edge](https://cloudlesslabs.com/stack/layers/edge/index.md): every tool in this layer
- [Storage and delivery](https://cloudlesslabs.com/stack/layers/storage/index.md): every tool in this layer
- [Every use case and tool in one file](https://cloudlesslabs.com/stack/brief.md)
- [Map of every Markdown file on cloudlesslabs.com, with what each one answers](https://ask.cloudlesslabs.com)
