The AI Year
All posts
1 min read

Shipping static sites on shared hosting

Static export on shared hosting: faster pages, simpler security, and deploys you can roll back without drama.

  • Next.js
  • Hosting

Shared hosting rarely runs a long-lived Node server. That is fine: static export gives you HTML, CSS, and JS that any Apache or Nginx host can serve cheaply and quickly.

The workflow

  1. Author content in Markdown under Posts/.
  2. Run npm run build locally or in CI.
  3. Upload the out/ directory to your public web root.

What you gain

  • Speed: files are served from the edge of a simple CDN or the host’s cache.
  • Security: no server runtime to patch for blog reads.
  • SEO: pre-rendered pages ship complete HTML to crawlers.

Tradeoffs

Dynamic features (comments, personalized dashboards) need a client-side or third-party backend. For a content blog, that is usually a feature, not a bug.

npm run build

Your out/ folder is the deploy artifact. Treat it like release binaries: versioned builds, predictable rollbacks.