Skip to content
StaticHero

Next.js Hosting

Host your Next.js site as a fast static export

Next.js can export your app as plain HTML, CSS and JavaScript. Upload the `out` folder to StaticHero and get a fast, cheap, server-free site.

Build command
next build
Upload folder
out/
SPA routing
Not needed
Free plan
Yes

In short

StaticHero hosts Next.js apps that use static export. Set output: 'export' in next.config, run next build, and upload the generated out folder. Pages, the App Router, client components, next/link navigation and images with unoptimized: true all work. Features that need a Node.js server — API routes, server actions, middleware/proxy, ISR and on-demand rendering — are not available in a static export.

Updated

How to deploy Next.js to StaticHero

  1. 01

    Build your project

    Run next build in your project folder.

  2. 02

    Find the out/ folder

    That folder contains plain HTML, CSS and JavaScript — the only thing your visitors need.

  3. 03

    Drag it onto StaticHero

    Drop the folder (or a ZIP of it) into your site in the dashboard.

No build servers

You build where you already build; we publish in seconds. No queue, no build minutes.

Instant rollback

Every upload is a version. Restore any previous build with one click.

Forms & analytics

Add a contact form and visitor analytics without a backend or extra scripts.

Custom domain + HTTPS

Connect your domain with one DNS record; certificates are automatic.

Configuration

Enable static export and disable the image optimizer (which needs a server):

next.config.ts
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  output: "export",
  trailingSlash: true,       // /about → /about/index.html
  images: { unoptimized: true },
};

export default nextConfig;

What works in a static export

Static export renders every route to HTML at build time. That covers most marketing sites, blogs, documentation and portfolios.

  • App Router and Pages Router pages
  • Server Components (rendered at build time)
  • Client Components, hooks and client-side data fetching
  • Dynamic routes with generateStaticParams
  • next/link prefetching and next/font
  • Metadata, sitemaps and Open Graph images generated at build time

What needs a server

Route handlers that read the request, Server Actions, Proxy (middleware), ISR/revalidation, cookies and headers at request time all require a running Node.js server, so they’re not supported on any static host. For a contact form, swap your server action for a plain form posting to /_forms/contact.

FAQ

Frequently asked questions

Still curious? Ask us anything — a person will reply.

Should I use trailingSlash?

+

It’s optional. With trailingSlash: true, Next exports about/index.html; without it, about.html. StaticHero serves both forms via clean URLs.

Do next/image components work?

+

Yes, with images.unoptimized: true, or with a custom loader pointing at an image CDN.

Can I host a full-stack Next.js app here?

+

No — if you rely on server rendering at request time, use a platform that runs Node.js. Many teams export marketing and docs sites statically and keep the app elsewhere.

Your site could be live in the next minute.

One site free, forever. No credit card, no setup, no servers.