Introduction
If you’ve built a React project and want to put it online quickly, Netlify is one of the easiest free hosting platforms. You don’t need to know servers or complicated setups — just connect your project and click deploy.
This guide shows you how to deploy a React template on Netlify step by step.
Why Use Netlify?
- Free plan is generous for small projects
- Automatic HTTPS (your site will have the secure lock)
- Continuous deployment — push to GitHub and Netlify updates automatically
- Custom domain support
Step 1: Push Your React Template to GitHub
Make sure your project is in a GitHub repo. If it’s still on your computer:
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/username/my-react-template.git
git push -u origin main
Now your code is online and ready for Netlify.
See Also: How to Deploy a Next.js Template to Vercel (Complete Tutorial)
Step 2: Create a Netlify Account
- Go to Netlify.com
- Sign up with GitHub (easiest option)
- Netlify will ask for permission to access your repositories
Step 3: Deploy Your Template
- Click Add New Site → Import an Existing Project
- Choose GitHub
- Select your React template repo
- Netlify auto-detects React and suggests build settings:
- Build Command:
npm run build
- Publish Directory:
build
Click Deploy Site.
Step 4: Preview Your Site
After 1–2 minutes, Netlify gives you a link like: https://my-react-template.netlify.app
Click it - your React app is live.
Step 5: Add a Custom Domain (Optional)
Want your own domain name (like mywebsite.com
)?
- Go to Site Settings → Domain Management
- Add your domain
- Update your DNS records with your domain provider
Netlify handles SSL automatically.
Troubleshooting Tips
- Build failed? Make sure you have
react-scripts
installed and"build": "react-scripts build"
in yourpackage.json
. - 404 error on refresh? Add a
_redirects
file with: /* /index.html 200
Conclusion
That’s it - you just deployed your React template on Netlify. Next, we’ll explore another free option: Render, which is also beginner-friendly and great for static sites.