How to Put a Static Website Online with Vercel (and a Warning About the Free Plan)
On this page
The short answer
If your site is plain HTML, CSS and JavaScript, you can publish it on Vercel by importing the folder, choosing Other as the framework, leaving the build command empty and keeping the output directory as the project root. HTTPS is added automatically.
One important warning first: Vercel’s documentation says the free Hobby plan is restricted to non-commercial, personal use only. If you build sites for paying clients, read this article’s section on that before you rely on the free plan.
What I use it for
I host the sites I build as plain files, with no build tool. Vercel is a good fit because it serves static files quickly and handles HTTPS for me.
My template has these parts:
index.html
css/style.css
js/config.js
js/main.js
vercel.json
Step by step
- Put your site in a folder, with
index.htmlat the top level. - Put the folder in a repository, or use Vercel’s tools to upload it.
- In Vercel, create a new project and import it.
- Set the framework preset to Other.
- Leave the build command empty.
- Keep the output directory as the root of the project.
- Deploy.
Vercel gives you a web address for the project. You can later attach your own domain if you have one.
The vercel.json file
I add a small vercel.json file to every site. It turns on clean URLs and sends a few security headers that are safe for a plain static site:
{
"cleanUrls": true,
"trailingSlash": false,
"headers": [
{
"source": "/(.*)",
"headers": [
{ "key": "X-Content-Type-Options", "value": "nosniff" },
{ "key": "X-Frame-Options", "value": "SAMEORIGIN" },
{ "key": "Referrer-Policy", "value": "strict-origin-when-cross-origin" },
{ "key": "Permissions-Policy", "value": "geolocation=(), camera=(), microphone=(), payment=()" }
]
}
]
}
I also use a strict Content Security Policy. It only allows scripts from the site itself, which is why my template keeps its JavaScript in separate files and never uses inline scripts. If you copy a policy like this, test your pages afterward, because a strict rule can block things you rely on, such as an analytics script.
Testing before you publish
Before deploying, I run a simple local server in the folder:
npx serve .
Open the address it prints and click through the page. This catches broken links and missing images before anyone else sees them.
The warning about the free plan
Vercel’s documentation for the Hobby plan says it is aimed at developers with personal projects and small-scale applications. It also says, referring to its fair use guidelines, that the Hobby plan restricts users to non-commercial, personal use only.
I am not a lawyer, and I am not sure how Vercel applies that rule to every situation, for example to a demo you build to pitch a client. What I would do:
- read Vercel’s current fair use guidelines yourself before relying on the free plan,
- assume that a site you build for a paying client is commercial,
- check the Pro plan, which Vercel documents as the paid option, and its price,
- consider other hosts for client sites, and read their terms too.
This is exactly the kind of cost I want to know about before I quote anyone, so it affects how I price my work. I cover pricing in a separate article.
What the free plan includes
For personal projects, the Hobby plan lists generous usage limits, for example a million CDN requests. Limits and rules change, so use Vercel’s own page rather than my summary.
Updating a site after it is online
Once a site is deployed, changes follow the same path: edit the files, test them locally and deploy again. If you connect a Git repository, many hosts redeploy automatically when you push a change. Check Vercel’s documentation for exactly how this works with your setup.
Keep your old versions in Git. If a change breaks something, you can go back to a version that worked. I also keep one clean copy of the template, separate from client projects, so a mistake in one site never leaks into another.

The page above is the kind of site this setup is made for: a few files, no build step and nothing to maintain on a server.
Common mistakes
Forgetting the output directory. If your site is not in the root, the deploy may show a blank page.
Blocking your own scripts with a strict policy. If the page loads but nothing appears, check the browser console for security-policy errors.
Not testing on a phone. The deploy can be fine and the layout still broken on a small screen.
Using the free plan for everything. Read the terms.
Frequently asked questions
Do I need a build tool? Not for plain HTML, CSS and JavaScript.
Can I use my own domain? Vercel supports custom domains. I have not covered the setup in this article.
Is HTTPS automatic? In my experience with static sites, yes.
Is the free plan okay for client sites? According to Vercel’s documentation, it is meant for non-commercial, personal use. Check the current terms.