Deployment
Deploy Codebase
There are a lot of different services to deploy your codebase. This guide will show you how to deploy your project on Vercel.
-
In the Vercel Dashboard → Click on
ADD NEW...
→PROJECT
-
Import the repository that you want to deploy (e.g.
nextjs-boilerplate
) -
Update all key-value pairs from your
.env.local
file underEnvironment Variables
. -
Hit the
DEPLOY
button. Your project will be available in 2-5 minutes.
Set up a Custom Domain
Follow these steps to add your own domain to your project:
This project setup uses an .app
domain for the app because the root domain (e.g.
www.exampledomain.com
) is already used by Framer for the landing page.
Connect a Custom Domain (Subdomain)
- In the Dashboard → Click on
SETTINGS
→DOMAINS
- Click on
ADD
and enter yourapp
subdomain (e.g.app.example-domain.com
) - Update the necessary DNS settings at your domain provider (e.g. Squarespace Domains). The DNS settings should be a
CNAME
record withNAME: app
andVALUE: cname.vercel-dns.com
.
Include Environment Variables
- Once your domain is set up, click on the three dots (…) next to your project
- Click on
SETTINGS
→ENVIRONMENT VARIABLES
- Find
NEXT_PUBLIC_SITE_URL
- Replace the old value with your new domain (e.g.
https://app.example-domain.com
)
Redeploy The Project
- If you’ve changed your environment variables, you will need to redeploy your project.
- Click on your project →
DEPLOYMENTS
, find the latest deployment, click on the three dots (…) and selectREDEPLOY
.