Disclosure: some links on this page are affiliate links. If you buy through them, AdifySkills may earn a commission at no extra cost to you. We only recommend hosting we use ourselves.
Quick answer: To host a React app on Hostinger, push your Vite or React project to GitHub, add a Node.js web app in hPanel, let Hostinger detect the framework, confirm the build command (npm run build) and output folder (usually dist or build), add environment variables, deploy and connect your domain. Make sure client-side routes are configured so refreshing a page does not show a 404.
Static frontends, done properly
React, Vue and Vite apps are usually single-page applications (SPAs). Once built, they are just HTML, CSS and JavaScript files. That makes them easy to host, but there are a few details, especially routing and environment variables, that trip people up.
Hostinger's managed Node.js hosting detects React, Vite, Vue and Angular projects and handles the build for you. This guide shows how to host a React app on Hostinger, plus the fixes for the most common problems.
Step 1: prepare your project
Vite projects
Typical package.json scripts:
"dev": "vite""build": "vite build""preview": "vite preview"
The build output is usually the dist folder.
Create React App and similar
Typical build output is the build folder. Many developers now move to Vite for faster builds.
Before you deploy
- Run
npm run buildlocally and open the result to check it works. - Move configuration into environment variables. In Vite, variables must start with
VITE_to be available in the app. These values are public in the browser, so never put secrets in them. - Commit your lock file.
Host your React app with Hostinger
Recommended: Hostinger Unlimited. Daily or weekly backups, free SSL, 30-day money-back guarantee.
Get Hostinger Unlimited →Opens Hostinger’s official site. See today’s price before you decide.
Step 2: deploy through hPanel
- Push your code to GitHub.
- In hPanel, add a new Node.js web app (labels may vary).
- Connect your repository and branch, or upload a ZIP.
- Confirm the detected framework, build command and output directory.
- Add environment variables (
VITE_API_URLand so on). - Deploy and open the URL.
Step 3: fix client-side routing
SPAs handle routes in the browser. When someone refreshes /pricing or opens it directly, the server looks for a file called pricing, does not find it, and shows a 404. The fix is to make the server fall back to index.html for unknown routes.
Options:
- Use the platform's SPA or rewrite settings if available for your app.
- If you serve the build with a small Node server, add a catch-all route that returns
index.html. - For static hosting with Apache-style rules, add a rewrite rule that sends unknown paths to
index.html.
âš Test deep links before you launch
Open several inner pages directly in a new browser tab and refresh them. If any show a 404, your routing fallback is not configured. This is the single most common issue with React and Vite deployments.
Step 4: connect your domain
Attach your custom domain or a subdomain such as app.yourdomain.com and confirm HTTPS.
Frontend plus backend on one plan
Many React apps talk to an API. On Hostinger you can run the frontend and a Node.js backend, such as an Express API, on the same plan, which keeps billing and management in one place. Point the frontend's VITE_API_URL to the backend's URL and configure CORS on the backend to allow your frontend domain.
Not sure which plan fits your business? Send us a WhatsApp message and we will suggest the right plan for free.
Performance tips
- Code splitting: use dynamic imports for heavy pages and components.
- Optimise images: compress and use modern formats.
- Avoid giant libraries for small features.
- Use caching headers for hashed asset files.
- Use a CDN for static assets where available.
- Check bundle size with a bundle analyser.
SEO considerations for SPAs
Single-page apps render content in the browser, which can make SEO harder for content-heavy sites. If organic search matters:
- Consider Next.js or another framework with server-side rendering or static generation.
- Pre-render key marketing pages.
- Set page titles and meta descriptions per route with a head management library.
For dashboards, tools and logged-in apps, SEO usually does not matter and a plain React or Vite SPA is perfect.
Common problems and fixes
| Problem | Cause | Fix |
|---|---|---|
| 404 on refresh | No SPA fallback | Rewrite unknown routes to index.html |
| Blank page | Wrong base path or failed script load | Check base setting and console errors |
| Env variable undefined | Missing VITE_ prefix or set after build | Rename and redeploy |
| API calls blocked | CORS | Allow the frontend origin on the API |
| Old version cached | Browser cache | Hashed filenames, redeploy, hard refresh |
Which Hostinger plan?
| Plan | India price* | US price* | Websites | Storage | Backups | Best for | |
|---|---|---|---|---|---|---|---|
| Single | ₹69/mo renews ₹289/mo | India only | 1 | 10 GB SSD | Weekly | One small site or portfolio | Get Single |
| Premium | ₹139/mo renews ₹449/mo | $2.49/mo renews $10.99/mo | 3 | 20 GB SSD | Weekly | Personal sites and side projects | Get Premium |
| Unlimited | ₹199/mo renews ₹649/mo | $3.49/mo renews $16.99/mo | Unlimited | 50 GB NVMe | Daily | Most business websites | Get Unlimited |
| Cloud Startup | ₹599/mo renews ₹1,599/mo | $7.99/mo renews $25.99/mo | Unlimited | 100 GB NVMe | Daily + on-demand | Busy stores, web apps, agencies | Get Cloud Startup |
*Promotional prices on a 48-month term, checked on Hostinger's official site in November 2026 during a sale. Prices change often and renewal prices are higher. Indian prices exclude 18% GST. Always confirm the live price before you pay.
- A single React frontend or portfolio: a web hosting plan with Node.js support.
- Several apps or frontend plus API: Cloud Startup.
A typical project structure for a small business app
A common setup we see for small business tools:
app.yourbusiness.comhosts the React or Vite frontend.api.yourbusiness.comhosts an Express API.- A MySQL database created in hPanel stores data.
- The main marketing site, perhaps WordPress, stays on
yourbusiness.com.
All of this can be managed from one Hostinger account, which is far simpler for small teams than juggling several providers.
Launch checklist for React and Vite apps
- ✅
npm run buildworks locally - ✅ Correct output folder (dist or build)
- ✅
VITE_variables set and no secrets exposed - ✅ Deep links refresh without 404s
- ✅ API URL and CORS configured
- ✅ Custom domain on HTTPS
- ✅ Favicon, page titles and social preview images set
- ✅ Analytics added if needed
Why we recommend this route
AdifySkills runs its website on Hostinger, and we encourage students and freelancers to ship real projects rather than leaving them on localhost. React and Vite apps on managed hosting are one of the fastest ways to build a portfolio of live work that clients can actually click.
Running frontend and API together? Choose Cloud Startup
Recommended: Hostinger Cloud Startup. Daily or weekly backups, free SSL, 30-day money-back guarantee.
Get Hostinger Cloud Startup →Opens Hostinger’s official site. See today’s price before you decide.
Conclusion
Hosting a React or Vite app on Hostinger is quick once your project is ready: standard build scripts, environment variables with the right prefix, GitHub or ZIP deployment and a routing fallback so deep links work. Add your domain and you have a fast, live app on a fixed-price plan, with room to run your API alongside it.
Frequently Asked Questions
Can I host a React app on Hostinger?
Yes. Hostinger's Node.js hosting detects React and Vite projects and can deploy them from GitHub or a ZIP upload.
Why do I get a 404 when I refresh my React app?
Your server needs a fallback that serves index.html for client-side routes. Configure the rewrite or SPA setting for your app.
How do environment variables work in Vite?
Only variables prefixed with VITE_ are exposed to your app, and they are public. Never store secrets in them.
Can I host the frontend and backend together?
Yes. You can run a React frontend and a Node.js API on the same Hostinger plan.
Is a React SPA good for SEO?
Not ideal for content-heavy sites. Use server-side rendering or static generation for pages that need to rank.
How do I update my React app after launch?
If your app is connected to GitHub, push changes to the production branch and Hostinger can redeploy automatically. With a ZIP deployment, build and upload the new version.
Can I use a subdomain for my app?
Yes. Many businesses host their app on a subdomain such as app.yourbusiness.com while keeping the main website on the root domain.
Does Hostinger support Vue and Angular too?
Yes. Hostinger mentions automatic framework detection for React, Next.js, Vue.js, Angular and Vite.
Ready to get your website on fast, reliable hosting?
- Free SSL and free domain for the first year on most plans
- Automatic backups
- 24/7 support
- 30-day money-back guarantee