DEV Community

Željko Šević
Željko Šević

Posted on • Originally published at sevic.dev on

Deploying Next.js apps to Vercel

This post covers the main notes for deploying to Vercel and domain setup.

Prerequisites

  • Next.js app bootstrapped

Deployment

Add a new project, import the Git repository, choose Next.js as the framework preset, set up environment variables, and trigger the deployment.

The deployed project will be available at <PROJECT_NAME>.vercel.app or <PROJECT_NAME>-<SUFFIX>.vercel.app URL.

The deployment happens every time new changes are pushed to the production branch.

Preview will be available when changes are pushed to a branch other than the production one.

DNS setup

A purchased domain is needed. You can buy it at Namecheap website.

Add a domain at the Project settings → Domains page.

Go to Account → Dashboard → Manage → Advanced DNS page for the purchased domain on the Namecheap website. Create two records

  • A record with @ host to point to Vercel server IP address with the specified value (76.76.21.21)
  • CNAME record with www host and specified value (cname.vercel-dns.com)

It might take some time for the changes to apply.

Course

Build your SaaS in 2 weeks - Start Now

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more