Cloudflare

Cloudflare shows up across every section of the site because it is several products at once for a static site: a host (Pages and Workers static assets), a CDN in front of other hosts, and an edge runtime for the handful of dynamic routes a static site needs. The guides below cover all three — deploying Astro and Hugo, headers and redirects, cache keys and tiered caching, Early Hints, middleware, rate limiting, and keeping previews private with Access.

Where a guide compares Cloudflare with another platform, the comparison is measured on the same build; where it describes a platform limit, the limit is stated with the date it was checked, because Cloudflare’s static offering has changed more than any other host’s in the last two years.

Cloudflare as host, CDN and edge runtime Three layers. As a host, Pages and Workers static assets serve the build output. As a CDN, it caches responses from another origin with cache rules and tiered cache. As an edge runtime, Workers handle forms, redirects, language detection and rate limits. Three roles Cloudflare plays for a static site Host Pages, Workers static assets serve the build CDN cache rules, tiered cache, Early Hints in front of any origin Edge runtime Workers, middleware, rate limits the few dynamic routes
Many sites use all three at once; the guides below are grouped by which role they concern.

Choosing the Right Static Site Generator for Production

Number of Cloudflare guides of each kind Vertical bars: How-tos 22, Fixes 2, Comparisons 3 and Concepts 0. Cloudflare guides by kind 22 How-tos 2 Fixes 3 Comparisons 0 Concepts
27 guides use Cloudflare in depth; each is listed below under the section it belongs to.

Core Web Vitals Optimization for SSGs

Production-Ready Deployment & CI/CD for SSGs

Topics with the most Cloudflare guides Horizontal bars, largest first: Cloudflare Pages Edge Caching Setup 10, CDN Caching Rules for SSGs 5, Serverless Functions for Static Sites 3, Image Optimization Pipelines in Astro 2, Internationalization for Static Sites 1 and Technical SEO for Static Sites 1. Where Cloudflare comes up Cloudflare Pages Edge Caching Setup 10 CDN Caching Rules 5 Serverless Functions 3 Image Optimization Pipelines in Astro 2 Internationalization 1 Technical SEO 1
Topic pages give the wider context for each group; the numbers count only guides that use this tool in depth.

Often used with Cloudflare

  • Netlify5 shared guidesHeaders, redirects, deploy previews and build caching.
  • AWS (S3 and CloudFront)4 shared guidesS3 and CloudFront: clean URLs, cache policies and deploys.
  • Vercel2 shared guidesNon-Next.js generators, the Build Output API and caching.
  • Eleventy2 shared guidesIncremental builds, image pipelines and the data cascade.
  • Astro2 shared guidesIslands, content collections, astro:assets and deployment.
  • GitHub Actions2 shared guidesCaching, matrix builds, reusable workflows and pinning.