How to Host Your React Project on Netlify for Free (Step-by-Step)
So you've built your React project and it's sitting on your laptop doing nothing.
You want people to see it. You want a real link you can send to clients, add to your portfolio, or post on LinkedIn. Netlify gives you all of that for free in under 10 minutes.
Here's exactly how to do it.
What You Need Before You Start
Your React project folder (built with Vite or Create React App)
A GitHub account
A Netlify account (free at netlify.com)
No credit card, no server, no DevOps knowledge.
Step 1 — Push Your Project to GitHub
Netlify deploys directly from GitHub, so your code needs to be there first.
Open your terminal inside your project folder and run:
Bash
git init
git add .
git commit -m "commit message"
git branch -M main
git remote add origin https://github.com/yourusername/your-repo-name.git
git push -u origin main
Your project is now on GitHub.
Step 2 — Create a Netlify Account
Go to netlify.com and sign up. Click "Sign up with GitHub" to connect both accounts automatically.
Step 3 — Import Your Project
Inside your Netlify dashboard:
Click "Add new site"
Select "Import an existing project"
Click "Deploy with GitHub"
Find and select your repository from the list
Step 4 — Configure the Build Settings
If you used Vite:
Build command: npm run build
Publish directory: dist
If you used Create React App:
Build command: npm run build
Publish directory: build
Set these correctly or your deployment will fail.
Step 5 — Deploy
Click "Deploy site". Netlify will:
Pull your code from GitHub
Run the build command
Publish the output
Give you a live URL like: random-name.netlify.app
Done in about 2 minutes.
Bonus — Auto Deploy on Every Push
Every time you push new code to GitHub, Netlify automatically rebuilds and redeploys your site. No manual steps.
You update your code → push to GitHub → site updates live.
Bonus — Add a Custom Domain
Go to Site settings → Domain management → Add custom domain and connect your domain. Netlify gives you a free SSL certificate automatically.
Common Errors and Fixes
"Page not found" on refresh:
Add a _redirects file inside your public folder with this line:
Code
/* /index.html 200
Build failed:
Check your build command and publish directory match your setup (Vite vs CRA).
That's it. You went from a local project to a live website with a real link. Free hosting, automatic deploys, custom domain support — all at zero cost.
Now go send that link to someone.
Have you deployed on Netlify before? Drop a comment — what error gave you the most trouble?
About the author
- Hey, I'm Funmibi — a self-taught frontend developer from Lagos, Nigeria. I build responsive, fast, and clean websites that help small businesses and startups show up professionally online. I write practical web dev tutorials on my blog to help other developers grow. If you need a website or want to collaborate, reach out at funmibitech@gmail.com
Comments
Join the discussionNo comments yet. Be the first to comment.






