Deploy a React + Tailwind template to Vercel, Netlify or cPanel
A step-by-step guide to building a Vite + React + Tailwind template and putting it live on Vercel, Netlify or ordinary cPanel hosting, with a custom domain.
You've found a template you like, you've tried the live preview, and now you want it on the internet with your own domain. Good news: this is the easy part.
Every template on usetemplates.store is a React 19 + Tailwind CSS 4 project built with Vite. When you build it, you get a folder of static files. No server code, no database, no environment variables. That means you can host it almost anywhere, from a free Vercel or Netlify account to the cPanel hosting your business already pays for alongside its email.
In this guide I'll walk through the three routes I get asked about most: Vercel, Netlify and cPanel. The steps match the official deploy docs, so you can switch between the two whenever you want more detail.
Before you start: build the site once
Whatever host you pick, the first steps are the same. You'll need Node.js 22 or newer on your computer (check with node -v). If you haven't set that up yet, the requirements page has installers for Windows, macOS and Linux.
Open a terminal in your template's folder and run:
npm install # once, downloads React, Tailwind, Vite and icons
npm run build # creates the production site in dist/
npm run preview # optional: check the build at http://localhost:4173
After npm run build you'll have a folder like this:
dist/
├── index.html
└── assets/
├── index-3f9a2c1b.js
├── index-8d1e04aa.css
└── hero-5b2c9e10.webp
That dist/ folder is your website. It's the only thing a host needs.
One warning I repeat to everyone: don't double-click dist/index.html to check it. Browsers block JavaScript modules loaded from file://, so you'll see a blank page and think something is broken. Use npm run preview instead.
The settings are the same on every host
If you remember one table from this article, make it this one:
| Setting | Value |
|---|---|
| Framework preset | Vite (or "Other" / "None") |
| Install command | npm install |
| Build command | npm run build |
| Output / publish directory | dist |
| Node.js version | 22 (the project's .nvmrc already says 22) |
| Environment variables | None |
| Redirects / rewrites | None |
Why no rewrites? Most single-page React apps need a "send every URL to index.html" rule, otherwise refreshing a deep link gives a 404. These templates avoid the problem: websites use anchor links (#properties, #contact), and apps and dashboards use hash URLs (#/settings). The server only ever has to serve index.html.
Also, vite.config.js uses base: './', so every asset path is relative. The same build works at yourbusiness.com/ and at yourbusiness.com/new-site/ without changing anything. Vite's own static deploy guide explains the base option if you're curious.
Which host should you choose?
Here's how I'd decide:
| Host | Start for | Best when | Deploys from |
|---|---|---|---|
| Vercel | Free Hobby plan (personal use) | You want automatic deploys from Git and a preview URL for every change | Git repo or CLI |
| Netlify | Free tier | You want the simplest possible deploy: drag a folder into the browser | Drag and drop, Git repo or CLI |
| cPanel | Your existing hosting plan | The business already pays for hosting and email, often bundled with a .co.tz or .com domain | File Manager or FTP |
Cloudflare Pages and GitHub Pages also work well; they have their own pages in the docs (Cloudflare Pages, GitHub Pages).
Option 1: Deploy to Vercel
Vercel detects Vite projects automatically and redeploys every time you push to Git. One thing to know up front: Vercel's free Hobby plan is for personal, non-commercial projects. Client and business sites belong on a paid Pro plan under Vercel's plan terms.
A. From your own GitHub repo (recommended)
Hosts that build from Git need permission to read the repository. Your access to the template's repo (usetemplates/<slug>) is read-only, so first push your customised copy to your own private repo:
git remote rename origin upstream
git remote add origin https://github.com/<your-username>/my-client-site.git
git push -u origin main
Keeping ours as upstream means git pull upstream main still brings in template updates later. The GitHub access page covers this step in full.
Then:
- Sign in at vercel.com with GitHub.
- Click Add New… → Project, then Import next to your repo. If it isn't listed, click Adjust GitHub App Permissions and give Vercel access.
- Check the settings Vercel fills in: Framework Preset Vite, Build Command
npm run build, Output Directorydist, Install Commandnpm install. - Click Deploy. About a minute later you'll have a URL like
https://my-site.vercel.app.
From now on, every git push to main updates the live site, and other branches get their own preview URLs. That's handy when you want a client to approve a change before it goes live.
If the build complains about the Node version, open the project's Settings → Build and Deployment → Node.js Version, choose 22.x and redeploy. Or add this to package.json:
"engines": { "node": ">=22" }
B. With the Vercel CLI (no Git)
If you'd rather not use Git at all:
npx vercel # first time: log in, answer the questions, get a preview URL
npx vercel --prod # publish to production
Accept the detected settings (Vite, npm run build, dist) and run npx vercel --prod again whenever you want to publish changes.
Option 2: Deploy to Netlify
Netlify has the simplest deploy I know of: you drag a folder into a browser window.
A. Drag and drop
- Build the site:
npm installthennpm run build. - Sign in at app.netlify.com.
- Go to Add new site → Deploy manually, or open Netlify Drop.
- Drag the
distfolder itself from your file manager onto the drop area. - Netlify gives you a URL like
https://lucky-otter-123.netlify.app. Rename it under Site configuration → Change site name.
To publish changes, run npm run build again and drag the new dist folder onto the Deploys tab of your site.
B. From your Git repo
Push to your own private repo as described in the Vercel section, then choose Add new site → Import an existing project, pick the repo and check the settings: Build command npm run build, Publish directory dist. Netlify reads .nvmrc for the Node version. If you want to be explicit, add a netlify.toml to the project root:
[build]
command = "npm run build"
publish = "dist"
[build.environment]
NODE_VERSION = "22"
C. Netlify CLI
npx netlify-cli login
npm run build
npx netlify-cli deploy --dir=dist # draft URL to check
npx netlify-cli deploy --dir=dist --prod # publish
A nice extra: Netlify can collect form submissions without a backend. The templates' forms work in the browser with demo behaviour; to receive real messages on Netlify, follow Netlify's guide for JavaScript-rendered forms (a hidden copy of the form in index.html plus data-netlify="true"). The full notes are on the Netlify docs page.
Option 3: Deploy to cPanel or shared hosting
A lot of small businesses, especially here in Tanzania and East Africa, already have hosting with cPanel, bundled with a domain and business email. You don't need anything new. You build on your computer and upload files; the hosting doesn't need Node.js.
The one rule: upload the contents, not the folder
Upload what is inside dist/, so index.html sits directly in public_html/. If you upload the dist folder itself, your site ends up at yourdomain.com/dist/ and the home page shows the host's default page.
Upload with File Manager
- Open
dist, select everything and compress it into a ZIP (Windows: right-click → Send to → Compressed (zipped) folder; macOS: right-click → Compress). - Sign in to cPanel and open File Manager.
- Open
public_html(for an addon domain or subdomain, open its own document root). - Delete or move the host's placeholder files (
index.html,default.html,index.php). Keep.well-known/andcgi-bin/. - Upload your ZIP, then right-click it → Extract into
public_html, and delete the ZIP. - Open
https://yourdomain.com.
Or upload with FTP
For repeated updates, FTP is quicker. Create an FTP account in cPanel, connect with FileZilla (use FTP over TLS or SFTP if your host supports it), open public_html on the server side and drag everything from inside dist across. Choose Overwrite when asked.
Add a small .htaccess
Most shared hosts run Apache or LiteSpeed. Put a file named .htaccess in your project's public/ folder, so Vite copies it into dist/ on every build. The one in the cPanel guide forces HTTPS, caches the hashed build files for a year, keeps index.html uncached and turns on compression. It's not a routing rule; the template doesn't need one.
Turn on HTTPS
In cPanel, open SSL/TLS Status (or Let's Encrypt SSL), select your domain and its www. version and run AutoSSL. If it fails, your domain usually isn't pointing at the server yet: check that its A record matches the shared IP shown in cPanel.
Connect your own domain
Vercel, Netlify and Cloudflare Pages all give you a free subdomain first. To use yourbusiness.co.tz, add the domain in the host's dashboard and create the DNS records it shows you where your domain is managed. Typical values:
| Host | Apex domain | www |
|---|---|---|
| Vercel | A → 76.76.21.21 | CNAME → cname.vercel-dns.com (or the project value shown) |
| Netlify | A → 75.2.60.5 (or Netlify DNS) | CNAME → <site>.netlify.app |
| cPanel | A → your server's shared IP | CNAME → your domain |
Always use the values your host's dashboard shows; they change occasionally. And if your email runs on the same domain, only touch the website records (A for @, CNAME for www). Leave MX and TXT records alone, or email stops working. The custom domains page has the full table, including Cloudflare and GitHub Pages.
Pre-launch checklist
Before you share the link, run through this:
- Demo text replaced: brand name, contact details, prices, reviews
- Demo images replaced, or Unsplash photos you're happy to keep
-
<title>, meta description and Open Graph tags set - Logo and favicon replaced
- Forms connected to a form service, or removed
- Menu links match the sections you kept
-
npm run buildruns without errors andnpm run previewlooks right - Checked on a real phone
If you haven't done the branding yet, my tutorial on changing colours, fonts and logo takes about fifteen minutes.
When something goes wrong
Three problems account for nearly every support message I get about deploys:
- Blank page: files were uploaded inside an extra folder,
assets/is missing, or the output directory isn'tdist. - Images missing only on the live site: Linux servers are case-sensitive.
Hero.webpandhero.webpare different files there. - The old version still shows: your browser or the host cached it. Hard-refresh, or clear the cache in your host's panel.
The troubleshooting page goes deeper on each.
Pick a template and try it
If you're still choosing, every template has a full live preview you can click through before buying, at <slug>.usetemplates.store. For example, Hooma, a real-estate site based on a UI concept by Ahmad Faizien for OnPoint Studio, is the example the docs use throughout, so it's an easy one to follow along with. Browse the rest in the full catalogue.
Once it's built, deploying really is a few minutes of work. Pick the host that fits how you like to work, upload dist/, point your domain, and you're live.
Yuso
Frequently asked questions
Do I need Node.js on my hosting to run a React template?
No. You run npm run build on your own computer, and the result is a dist/ folder of plain HTML, CSS, JavaScript and images. Any host that serves static files can run it, including cPanel shared hosting with no Node.js support.
Which folder do I upload: the project or dist?
Only the build output. On Vercel, Netlify and Cloudflare Pages set the output or publish directory to dist. On cPanel, upload the contents of dist/ so that index.html sits directly inside public_html.
Do I need redirect or rewrite rules for a single-page app?
Not for usetemplates.store templates. Websites use anchor links like #contact and apps and dashboards use hash URLs like #/settings, so the server only ever serves index.html and no rewrites are needed on any host.
Why is my site a blank page after I upload it?
The usual causes are uploading the dist folder itself instead of its contents, uploading index.html without the assets folder, or opening dist/index.html straight from your file manager. Use npm run preview to check the build locally, then upload the contents of dist/.
Can I use the free Vercel plan for a client's business site?
Vercel's free Hobby plan is meant for personal, non-commercial projects. For a client or business site, use a paid Vercel Pro plan, or a host whose free plan allows commercial use.
Templates in this article
Related articles

Customise a Tailwind template: colours, fonts and logo
A 15-minute tutorial for rebranding a React + Tailwind CSS 4 template: change the @theme colour tokens, swap Google Fonts, replace the logo and favicon.

How to Choose a Website Template for a Small Business
A practical buyer's guide to picking a small business website template: what to check in the preview, the code, the licence and hosting, plus a checklist.

Designing auth screens people enjoy: lessons from Tidepool
A design case study of Tidepool, a playful auth kit: sign-in, sign-up, reset password and 404 screens with sea creatures that react to the form, built in React.