Deploy Next.js Static Output

Build Next.js with npm run build, ZIP the contents of out/, and deploy the generated browser assets on Linkyhost. Asset-only hosting; JavaScript output requires Pro.

Asset-only runtime. Linkyhost serves the files already present in your ZIP. It does not install dependencies, run a build, or provide Node.js, PHP, Python, Ruby, serverless functions, API routes, SSR, background jobs, or WebSockets.
Your built files determine the plan. Every multi-file website ZIP requires Pro, including HTML/CSS-only output and JavaScript framework builds. One standalone HTML page can use the Free plan.

Build Output for Next.js

Build command

npm run build

ZIP the contents of

out/

ZIP the files inside the output directory

ZIP the contents of the generated output directory, with index.html at the ZIP root. Do not ZIP the project source directory. Uploading the project directory can expose source files and will not run a build on Linkyhost.

  • Set output: 'export' and trailingSlash: true in next.config.js before building. Modern Next.js creates out/ during next build; do not use the removed next export command.
  • Only a static export is supported. SSR, API routes, Server Actions, runtime redirects, and runtime headers need a Next.js server and are not included.

How to Deploy Next.js

1

Run npm run build.

2

ZIP the contents of out/ so index.html is at the ZIP root.

3

Upload the ZIP to Linkyhost, review the detected routing and configuration, then deploy.

SPA Routes, Redirects, and Headers

Put optional routing files in the generated output before you ZIP it. Deployment diagnostics report accepted and ignored rules.

SPA fallback

/* /index.html 200

For a client-routed SPA, keep index.html at the output root. Linkyhost detects common browser-app builds automatically, or you can add /* /index.html 200 to _redirects. Exact assets and directory indexes always win before the fallback.

_redirects

/old /new 301

Put a _redirects file at the output root for deployment redirects. Use one rule per line, such as /old /new 301; supported redirect statuses are 301, 302, 307, and 308. Framework redirects that require a server are not executed.

_headers

/assets/*
  Cache-Control: public, max-age=31536000

Put a _headers file at the output root for path-specific response headers. Start each block with a path, then indent allowlisted Name: value lines. Unsafe or platform-owned headers are ignored and reported in deployment diagnostics.

Build-output detection and diagnostics

Automatic HTTPS and CDN delivery

Validated redirects and response headers

Exact assets before optional SPA fallback

Frequently Asked Questions

What do I upload for a Next.js deployment?

Run npm run build, then ZIP the contents of out/. The ZIP should open directly to index.html and browser assets, not another output folder or your project source.

Can Linkyhost run every Next.js feature?

Linkyhost serves the files already present in your ZIP. It does not install dependencies, run a build, or provide Node.js, PHP, Python, Ruby, serverless functions, API routes, SSR, background jobs, or WebSockets.

Is a Next.js deployment free?

Every multi-file website ZIP requires Pro, including HTML/CSS-only output and JavaScript framework builds. One standalone HTML page can use the Free plan.

How do SPA routes, redirects, and response headers work?

For a client-routed SPA, keep index.html at the output root. Linkyhost detects common browser-app builds automatically, or you can add /* /index.html 200 to _redirects. Exact assets and directory indexes always win before the fallback. Put a _redirects file at the output root for deployment redirects. Use one rule per line, such as /old /new 301; supported redirect statuses are 301, 302, 307, and 308. Framework redirects that require a server are not executed. Put a _headers file at the output root for path-specific response headers. Start each block with a path, then indent allowlisted Name: value lines. Unsafe or platform-owned headers are ignored and reported in deployment diagnostics.

Related Frameworks

Ready to Deploy Next.js?

Build locally, ZIP the contents of out/, and upload it for detection and deployment diagnostics. HTML/CSS-only output can run free; output containing JavaScript requires Pro.

Upload a Build ZIP