Programming
HowToRequest Team
1 min read
Deploy Next.js Static Export on Vercel
Configure output: export, serve the out/ directory, set framework detection, and avoid common static hosting pitfalls.
Table of Contents

Deploy Next.js Static Export on Vercel
Static export (output: 'export' in next.config) emits HTML + assets to out/ — ideal for content-heavy sites with minimal server logic.
Configure Next.js
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
output: "export",
images: { unoptimized: true },
};
export default nextConfig;
Unoptimized images are common with pure static hosting unless you integrate an external image CDN.
Vercel project settings
- Build command:
npm run build - Output directory:
out - Ensure the dashboard Root Directory points at the folder containing
package.json.
SEO routes
Add app/sitemap.ts and app/robots.ts with export const dynamic = "force-static" when using static export so routes prerender cleanly.
Trade-offs
You lose dynamic server features unless you move them to edge functions or external APIs — a strong fit for content-heavy tutorial sites that ship mostly static pages.
Get the next tutorial first
One email when we ship high-signal guides — stored securely in Firebase Firestore.
Share
Back to all tutorials