Static Site Generation for Your Own Site: JAMstack, Build Times, CDN Deployment, and SEO
1. What Does JAMstack Actually Solve?
The three letters of JAMstack stand for JavaScript, API, and Markup. The traditional setup goes “user request → server runs a database query → renders HTML → returns it,” and every step costs time. JAMstack moves all three steps up to build time: at deploy, the generated HTML files go out to a global CDN, and when a user visits, the CDN returns the file directly without touching any backend.
A counterintuitive take: JAMstack’s biggest payoff isn’t security or cost — it’s SEO and first-screen speed. Pages rendered dynamically from a database usually have a TTFB of 300 to 800 milliseconds, and users still wait for JavaScript to download and run. Static HTML comes straight back from the CDN, often with TTFB under 100 milliseconds, and crawlers get fully rendered content. For how to measure Core Web Vitals, see Core Web Vitals Optimization.
But static doesn’t mean “nothing can move.” Interactive parts of the page — inquiry forms, live inventory, currency conversion — call APIs from JavaScript in the browser, which doesn’t affect static HTML delivery. That’s what “APIs handle anything dynamic” means. For how to choose a CDN, see CDN global acceleration.
| Architecture | TTFB | What crawlers get | Server cost (monthly) | Best for page types |
|---|---|---|---|---|
| Static HTML + CDN | 50 to 100 milliseconds | Fully rendered HTML | 0 to 50 yuan | Articles, product pages, About page |
| SSG + ISR (Next.js) | 100 to 300 milliseconds | Complete HTML | 200 to 800 yuan | Articles plus list pages that need periodic refreshes |
| SSR dynamic rendering | 300 to 800 milliseconds | Must wait for rendering | 1,000 to 5,000 yuan | Personalized pages, real-time data pages |
| SPA client-side rendering | 20 to 50 milliseconds (empty shell) | Blank HTML + JS | 0 to 200 yuan | Admin dashboards, not suitable for marketing pages |
2. Build Time: The First Bottleneck Once You Have More Pages
When a site has few pages, build time isn’t a problem. Hugo builds 50 pages in seconds. But once you pass 500 pages, frameworks start to diverge: Hugo still finishes in under 30 seconds, Next.js can take 3 to 5 minutes, and Gatsby can exceed 10 minutes. Build time affects two things: how long you wait for content to go live, and the developer experience of waiting minutes just to fix a typo.
Scenario 1: A B2B blog with 300 articles built up over two years, running on Next.js. Every time someone edits an article title, a full build takes 4 minutes, and the team starts avoiding frequent content changes. The fix is to enable Next.js Incremental Static Regeneration (ISR) or switch to content-layer caching, rebuilding only the affected paths. Build time drops from 4 minutes to 20 seconds.
Scenario 2: A product catalog site with 2,000 SKUs, one detail page each. A full Next.js build takes 12 minutes and runs automatically once a day. At this scale, switch to Hugo or Eleventy, and build time drops under 1 minute. For batch image compression, see Image SEO and WebP.
| Page count | Hugo build time | Next.js SSG build time | Recommendation |
|---|---|---|---|
| Under 100 pages | 2 to 5 seconds | 30-60 seconds | Any framework works, little difference in experience |
| 100 to 500 pages | 5 to 20 seconds | 1 to 3 minutes | Next.js is fine, enable incremental builds |
| 500 to 2,000 pages | 20 to 60 seconds | 3 to 8 minutes | Prefer Hugo, Next.js needs heavy optimization |
| Over 2,000 pages | 1 to 3 minutes | Over 10 minutes | Must use Hugo or sharded builds |
3. CDN deployment: how long from commit to global availability
JAMstack deployment is simple: git push, the platform builds automatically, generates static files, and pushes them to global CDN nodes. Vercel and Netlify have native support for Next.js and Eleventy, while Cloudflare Pages works well with Hugo and plain static files. From commit to globally accessible usually takes 30 seconds to 3 minutes.
Here’s a common pitfall: CDN cache invalidation. If you change a product price and redeploy, some edge nodes may still serve the old version for up to 24 hours. The fix is to trigger a full CDN purge after deployment, or add a content hash to the URL (filename with hash, like style.abc123.css) so new files automatically replace old ones. For cache strategy setup, see Site caching strategy.
Real-world example: An overseas lighting brand uses Next.js SSG, and a full build of 200 product pages takes 3 minutes. A marketing colleague changes a product image, commits the code, waits 3 minutes for the build, then another minute for the CDN to update before users see the new image. After enabling ISR with 60-second revalidation per page, users see the new version within 60 seconds of the change, and build time drops from 3 minutes to 40 seconds.
| Deployment platform | Free tier | Global nodes | Build time limit | Best for |
|---|---|---|---|---|
| Vercel | 100GB bandwidth/month | 300+ | 6 minutes/build | Next.js projects, team collaboration |
| Netlify | 100GB bandwidth/month | 100+ | 30 minutes/build | Hugo/Eleventy, form features |
| Cloudflare Pages | Unlimited bandwidth | 300+ | No hard limit | Large page volume, cost-sensitive |
| Self-hosted + Cloudflare CDN | CDN is free, origin billed separately | 300+ | You control it | Need a custom build pipeline |
4. The SEO angle: why static sites have a natural edge
Google’s crawler can run JavaScript now, but its execution time and resources are limited. Static HTML returns the full content on the first request, so the crawler doesn’t have to wait for JavaScript to run, and content won’t be missed if a script fails to load. The direct SEO payoff: pages get indexed faster, there are fewer rendering errors, and structured data is guaranteed to be read.
Another benefit: the sitemap and URL structure can be generated once at build time, with no dynamic database queries. File names, directory depth and canonical tags can all be hardcoded in the build script, so you avoid the duplicate content between tag pages and post pages that plagues dynamic sites. For how to optimize your sitemap, see XML sitemap optimization.
But here’s a counterintuitive point: static sites don’t win on every SEO metric. If your content changes often (daily pricing or inventory updates, say), static pages go stale, and users land on a page showing a price from 24 hours ago, which pushes up bounce rate. Pages like that have to pull live data from a client-side API, not be forced into static HTML.
One more practical detail: image handling on static sites. WordPress generates multiple sizes automatically on upload, but with Hugo and 11ty you have to write that into the build script yourself. Skip that step and users download a 4000-pixel-wide original image on their phones, sending LCP from 1.5 seconds straight to 4. For how to set up image compression and format conversion, see Image SEO and the WebP format.
| SEO metric | Static site | Dynamic site | Why the gap |
|---|---|---|---|
| Crawler sees full above-the-fold content | 100% | 60% to 90% (depends on JavaScript execution) | No render wait |
| TTFB | 50 to 100 milliseconds | 300 to 800 milliseconds | No database queries |
| LCP | 1.0 to 1.8 seconds | 2.0 to 4.0 seconds | Served straight from CDN, no backend |
| Content freshness | Low (snapshot at build time) | High (latest on every request) | Static is a double-edged sword |
| Structured data reliability | 100% | 80% to 95% | Written into the HTML at build time |
FAQ
How does JAMstack beat traditional WordPress on SEO?
What if builds take too long — 8 minutes for 500 pages on Next.js?
How do content updates on a static site get pushed to the CDN? Do I have to clear the cache manually?
Which pages shouldn’t be made static?
How do I choose between Hugo and Next.js SSG?
Does deploying JAMstack to Cloudflare Pages cost money?
Final thoughts
JAMstack isn’t some new concept. It’s essentially “do everything ahead of time that can be done ahead of time.” For B2B standalone sites that are mainly about displaying content, this architecture wins on performance, cost, and SEO at the same time, so there’s almost no reason to turn it down. The only hurdle is that your team has to accept the “generate at build time” way of working: content changes wait for a build, and you can’t see the result the moment you hit save like you can with WordPress.
Start with the smallest viable step: move just the blog to a static site using Hugo or Eleventy, and leave your existing WordPress site untouched. Run it for a month and compare LCP, indexing speed, and server costs before and after. If the gains are clear, migrate the product pages and homepage next. The beauty of migrating in stages is that you can roll back at any time.
One line worth remembering: the advantage of a static site isn’t that it’s “static” — it’s that crawlers and users get the same complete content at the same moment. In the age of dynamic rendering, that’s a rare thing.
