Vercel
A hosting platform that automatically turns your website code into a live site. Connect a Git repo, push code, and your site updates online.
On this page
What is Vercel?
Vercel is a hosting platform that puts your website on the internet for everyone to open. You put your code in a Git repository, and Vercel automatically builds it, publishes it, and serves it from locations close to each visitor.
Think of an automatic factory combined with local chain stores: you hand in your blueprints (code), it builds the finished pages for you, and sends copies to shops around the world.
Vercel builds, runs, and delivers your website—it does not write the code for you.
What happens when you push code?
The easiest workflow is connecting Vercel to your Git repository (such as GitHub). After that, every update goes through four automatic steps.
Connect your Git repo: pick your project repository inside Vercel and confirm basic settings.
Push your changes: whenever you push new code, Vercel gets notified right away.
Auto-build: Vercel installs the helper packages your project needs and runs the build command to make ready-to-serve files.
Go live or preview: if the build succeeds, pushing to your main branch updates the live site; pushing to another branch creates a temporary preview link to test first.
If a build fails, Vercel leaves your working live site untouched. You can read the error diary (logs), fix the bug, and try again.
Publish from the command line too
Besides automatic Git deploys, you can also publish straight from your computer’s terminal.
- First, install Vercel’s command-line tool (this needs Node.js on your computer).
- Run
vercel, sign in, and confirm the settings to get a temporary preview link. - Once it looks good, run
vercel --prodto publish that version to your main public address.
Three commands for installing, previewing, and going live:
npm install -g vercel
vercel
vercel --prodThe first run asks a few questions like your project name and framework. After that, re-publishing takes just one command.
How is Vercel different from renting your own server?
Both put your website online. The big difference is who takes care of the server computer.
| Compare | Using Vercel | Renting your own server |
|---|---|---|
| How you publish updates | Push code to Git and it builds and launches itself | Log into the server, pull code, and restart the app by hand |
| Who cares for the machine | Vercel handles it for you | You handle updates, security, and adding power when traffic spikes |
| How much control you have | Follow platform rules—super easy, fewer deep tweaks | Change anything you want, but build everything yourself |
You can also host just your website frontend on Vercel while keeping your database or heavy backend somewhere else—not everything has to live on one platform.
When is Vercel a good fit?
Vercel is a great match when your project is mostly web pages and you want a quick push-to-publish flow.
- Next.js sites: Vercel and Next.js come from the same company, so setup is almost zero.
- Sharing drafts with teammates: every branch automatically gets a preview link anyone can click and review.
- Static websites and docs: build once and deliver fast from locations around the world.
Automatic builds, preview links, and global delivery remove most of the boring server chores.
Free plans have limits and costs grow with heavy traffic. Platforms also have runtime limits, so complex, long-running backend jobs often fit better on a dedicated server.
Common things people get wrong
Can Vercel only host Next.js websites?
No. It supports many tools like Astro, Vue, React, and plain static sites, though Next.js gets the tightest integration.
Does Vercel store my Git code like GitHub?
No. Your code still lives in a Git host like GitHub. Vercel simply reads that repo to build and publish your site.
Is it safe to write passwords or secret keys into my code before deploying?
Never! Put secrets in Vercel’s “environment variables”—a private safe box in the dashboard. Do not commit secret keys into Git, and never expose them in browser code.
Quick quiz
Once your Git repository is connected to Vercel, what happens automatically every time you push new code?
It rebuilds and publishes automatically. Vercel receives the push, installs packages, and builds the site. If it succeeds, other branches get a preview link, and your main branch updates the live website.
Remember this: Vercel turns “push code” into “publish online automatically.”
Read further
These official guides are a great next step.