Vercel
Deploy your app to production - make it live on the internet
What is Vercel?
This is what puts your app on the internet for people to see. Like publishing your site.
Deploy via Web Interface
Step-by-Step Setup
Add New Project
and choose your app repoDeploy
Environment Variables (IMPORTANT!)
Critical Step:
Go to the Settings tab and find Environment Variables. Add any keys or secrets from your .env
file here manually.
Your app won't work properly in production without these environment variables!
You're Live!
That's it. Your app is now live. You'll get a link like:
You can share this anywhere — it updates automatically every time you push to GitHub!
Deploy via Terminal (CLI)
You can also interact with Vercel through your terminal for more control:
1. Install Vercel CLI
npm install -g vercel
2. Login to Vercel
vercel login
Follow the steps — they'll send a magic link to your email.
3. Deploy Your App
For preview deployments:
vercel
For production deployment (what people will see online):
vercel --prod
The terminal will give you a live URL right after deployment.
4. Update Your App
If you update your code, just re-run vercel --prod
to publish changes.
Custom Domain Setup
Want a custom domain? (like mycoolapp.xyz
instead of your-app-name.vercel.app
) Here's the detailed step-by-step process:
Step 1: Add Domain in Vercel
- •Navigate to Settings → Domains on Vercel and press the 'Add Domain' button.
- •Add
example.com
(notwww.example.com
,https://www.example.com
, orhttps://example.com
). Make sure there's no space after the text likeexample.com[space]
.
Make sure 'Connect to an environment' is set to 'production' and use the 'recommended' setting:

Step 2: Configure DNS Records
Vercel will show you two DNS Records that you need to add in your Advanced DNS settings on your domain provider (Namecheap, GoDaddy, etc.):
Name/host: www
Value: cname.vercel-dns.com.
Name/host: @
Value: 76.76.21.21
Important: Note the '.' after '.com' (cname.vercel-dns.com.
)
Here's what the DNS records look like in Vercel:

Step 3: Add Records to Your Domain Provider
Go to your domain provider's Advanced DNS settings and add the records above. Here's an example from Namecheap:
Example: Namecheap Advanced DNS settings:

Step 4: Wait for Propagation
⏳ Be Patient: DNS changes can take up to a few hours to reflect globally. Don't panic if it doesn't work immediately!
Once successful, you'll see this in your Vercel dashboard:

Common Issues & Solutions
App Works Locally But Not in Production
This usually happens because:
.env
variables to VercelBuild Errors
If your build fails:
npm run build
package.json
Deployment Best Practices
Before Every Deployment
npm run dev
npm run build