Deployment
How to Deploy a Next.js App to Vercel
Deploy a Next.js app with the right environment, preview checks, custom domain, and production handover. Updated for November 2026.

To deploy a Next.js app on Vercel, connect the correct project, configure its environment, build it, and test the deployed URL before routing customers to it. A successful build is the start of the release check, not proof that sign-in, forms, or database access work.
This November 2026 guide covers the practical route from a local app to a working deployment. The existing URL is retained, but a production release should not be planned around a ten-minute promise.
1. Check the project before deploying
Use a Node.js version supported by both your Next.js release and Vercel. Match local and deployment settings; do not follow an old minimum-version recommendation without checking the current supported runtimes.
Run the project's installation and build commands. For an npm project with a committed, current lockfile:
npm ci
npm run build
Resolve build failures locally before troubleshooting hosting. For monorepos, identify the application directory and its package manager. Never commit secret environment files to make a remote build work.
Choose a plan appropriate to the project. Vercel documents Hobby as a personal, non-commercial plan; check the applicable plan for a business website or customer product.
2. Decide between a static site and a server-backed app
A static export can use Server Components at build time. It does not provide a request-time application server. Features that need request-time cookies, server mutations, or dynamic server processing need a compatible deployment architecture.
Do not remove output: 'export' merely because the site uses React Server Components. Equally, do not add it to an app that depends on server features just to make deployment simpler. Review Next.js static export support and Next.js on Vercel against the features your app actually uses.
3. Select the correct Vercel project
You can import a Git repository in the dashboard, or use the CLI:
npm install -g vercel
vercel login
vercel link
Check the team, project, and root directory before accepting the link. Link to the existing project when one already serves the application; creating a second project can leave domains and environment configuration in different places.
In repeatable CI, use a reviewed, pinned CLI version rather than automatically changing it on every run.
4. Configure environments before the build
Keep development, preview, and production configuration separate. Check database URLs, authentication callbacks, email credentials, storage, and any payment test/live mode.
Set variables through the project's environment settings or the CLI:
vercel env add DATABASE_URL
Select the intended environment when prompted. Do not print secrets into build logs. Values prefixed with NEXT_PUBLIC_ are intended for browser exposure; do not use that prefix for private credentials. Other values can still leak if application code explicitly sends them to the browser.
Build a new deployment after changing environment values. See Vercel environment variables for scope and deployment behaviour.
5. Understand first deployments and previews
For an existing project with its initial deployment already created:
vercel deploy
This normally creates a preview. However, current Vercel documentation says the first deployment of a new project is a production deployment, even without --prod, and uses production environment variables. Read the deployment environment rules before treating a first deploy as a private staging environment.
With Git integration, confirm which branch is configured for production. Test changes on a non-production branch and check the reported target; do not infer the target from the URL alone.
6. Test the journey a customer will take
Use controlled test accounts and data. Check more than the homepage:
- Load a deep link directly and refresh it.
- Submit a form and confirm the destination receives the record.
- Sign in, sign out, and test recovery links if accounts are supported.
- Confirm one test account cannot read another account's private data.
- Check server logs for failed requests and missing configuration.
- Confirm preview systems are not sending real customer notifications.
Database migrations require their own plan. A code deployment does not prove the database schema matches the app, and rolling back code does not automatically reverse a migration.
7. Release and connect the domain
For a later production release, the CLI command is:
vercel deploy --prod
Verify the production configuration and test the resulting deployment. Add the domain in project settings and use the DNS values Vercel displays for that domain. Avoid copying a generic DNS record from an old tutorial.
Keep existing mail records intact. After DNS is ready, check HTTPS, redirects, the preferred hostname, canonical URLs, the sitemap, and the live enquiry flow.
Troubleshoot the first failure, not the final error message
| Symptom | Check first |
|---|---|
| Module not found | Import path case, dependency declarations, lockfile, and root directory |
| Works locally but fails remotely | Node version, environment scope, build logs, and external service access |
| Static dynamic route returns 404 | Whether the required route was generated at build time |
| Sign-in redirects to localhost | Auth provider callbacks and application base URL |
| Function times out | Slow external calls, logs, runtime configuration, and current plan limits |
Function duration limits depend on runtime and configuration. Consult Vercel's duration documentation instead of assuming older ten- or sixty-second limits apply.
Before a year-end release
For a November launch, choose a release window when somebody can investigate failures. Confirm who owns hosting, DNS, database recovery, and customer enquiries while staff are away. Record the working deployment and the database migration state before making changes.
Use the production readiness checklist for the wider review. If you are taking over an existing app, the technical due diligence guide covers ownership and handover.
Need help getting an app live?
Junctd provides technical support and launch help from Brisbane for businesses across Australia. Describe the deployment issue with the framework, hosting setup, and a redacted error message. Keep credentials and customer data out of the enquiry.


