Where to Host a React App in 2026: Static, SSR or Full-Stack

Key Takeaways
- ✓A static React build can be hosted free on Cloudflare Pages, Netlify or Render.
- ✓Client-side routes need a fallback to index.html or refreshes return 404.
- ✓Next.js needs a Node.js runtime: Vercel, a container or a VPS.
- ✓React plus an API and database runs best together in one container or VPS.
Table of Contents
- •Where to Host a React App in 2026: Static, SSR or Full-Stack
- •Which Kind of React App Do You Have?
- •Hosting a Static React App
- •Hosting Next.js and Other Server-Rendered React
- •Hosting a Full-Stack React App
- •Environment Variables in React
- •How to Choose
- •Frequently Asked Questions
- •Host Your React App and API Together
Where to Host a React App in 2026: Static, SSR or Full-Stack
Where you should host a React app depends on what kind of React app it is. A single-page app built with Vite is just static files and can be hosted almost anywhere for free. A Next.js app with server-side rendering needs a Node.js process or a serverless platform. A full-stack app with an Express API and a database needs a server that runs all the time. This guide matches each type to the right hosting, with prices checked on providers’ own pages on 26 October 2026.
Short answer: static React (Vite or Create React App): Cloudflare Pages, Netlify or Render’s free static hosting. Next.js: Vercel, or a container or VPS for predictable costs. React plus an API and database: container hosting or a VPS.
Which Kind of React App Do You Have?
| App type | Built with | What it needs | Good hosting |
|---|---|---|---|
| Static single-page app | Vite, Create React App | Serve index.html and static files; SPA fallback | Cloudflare Pages, Netlify, Render static, any web server |
| Server-rendered React | Next.js, Remix/React Router | A Node.js runtime or serverless functions | Vercel, Netlify, container hosting, VPS |
| Full-stack (MERN-style) | React + Express/Nest + MongoDB/Postgres | An always-on API and a database | Container hosting, PaaS, VPS |
Hosting a Static React App
Run npm run build and you get a folder of static files (dist with Vite, build with Create React App). Any static host serves them. The one setting that trips people up: client-side routes need a fallback to index.html, or refreshing a page like /dashboard returns 404.
| Host | Free plan | SPA fallback |
|---|---|---|
| Cloudflare Pages | Yes, 500 builds/month | Automatic for SPAs without a 404.html |
| Netlify | Yes, 300 credits | /* /index.html 200 in _redirects |
| Render | Static sites are free to deploy | Rewrite rule in the dashboard |
| Your own Nginx | Server cost only | try_files $uri /index.html; |
Plan details from Cloudflare’s Pages docs, netlify.com/pricing and Render’s docs, checked 26 October 2026. On Nginx, a minimal config:
server {
listen 80;
server_name app.example.com;
root /var/www/app/dist;
location / {
try_files $uri /index.html;
}
}Hosting Next.js and Other Server-Rendered React
Next.js needs a server for SSR, API routes and image optimisation. Your options:
Vercel: the deepest Next.js support. Hobby is for personal, non-commercial use; Pro is $20 a month with a $20 usage credit and 1 TB of fast data transfer, then from $0.15 per GB.
Netlify: supports Next.js on its credit-based plans (Pro $20 a month with 3,000 credits).
Self-hosted with
next startor a standalone build in a container or on a VPS, behind Nginx or Caddy: a fixed monthly cost and no per-GB bandwidth fees within your allowance.
We compare these in detail in Vercel alternatives for Next.js.
Hosting a Full-Stack React App
A React frontend with an Express or NestJS API and MongoDB or Postgres needs an always-on process and a database. Splitting it across a static host for the frontend and a separate service for the API works, but you end up with several bills and CORS to configure. Running both together is simpler:
RackUp Cloud Apps run MERN or any Dockerfile in one container, deployed on every Git push, with a private MongoDB, MySQL or Postgres database on Cloud Starter ($2.44 a month, 1 GB RAM) and Cloud Pro ($5.69 a month, 2 GB RAM). Each plan includes a browser-based AI workspace (VS Code with Claude Code, Codex and Gemini CLI).
A PaaS like Render or Railway: the API as a web service (Render Starter is $7 a month for 512 MB) plus a separately billed database.
A VPS for several apps: RackUp’s Developer VPS (8 vCPU, 12 GB RAM, 32 TB bandwidth, root access, $35 a month) includes a managed Next.js and React setup.
Environment Variables in React
A static React build bakes environment variables into the JavaScript at build time, and anyone can read them in the browser. Only expose public values there (Vite uses the VITE_ prefix, Next.js uses NEXT_PUBLIC_). Keep API keys and database credentials on the server side: in your API or in Next.js server code.
How to Choose
Static SPA or portfolio: Cloudflare Pages or Netlify, free.
Next.js using Vercel-specific features heavily: Vercel.
Next.js with predictable traffic and costs: a container or VPS.
React plus API plus database: container hosting, or a VPS for several apps.
Frequently Asked Questions
Can I host a React app for free?
Yes, a static React build. Cloudflare Pages, Netlify and Render all host static sites on free plans. Apps that need a server or database usually need a paid plan.
Why do I get a 404 when I refresh a React route?
The host looks for a file at that path. Add a fallback that serves index.html for unknown paths, such as try_files $uri /index.html; in Nginx.
Do I need Node.js on the server to host React?
Not for a static build. You need Node.js only for server rendering (Next.js, Remix) or a Node.js API.
Is Vercel the best place to host Next.js?
It has the deepest Next.js support. A container or VPS can be cheaper and more predictable for steady traffic or high bandwidth.
Can I host React and the API on the same server?
Yes. Serve the React build as static files and proxy /api to your backend, or let Express serve both.
Host Your React App and API Together
Deploy React with its API and database from Git on RackUp Cloud Apps from $2.44 a month, or get a Developer VPS with root access for $35 a month. See plans.
Unsure Which Cloud Hosting Plan Fits Your Site?
Answer 4 quick diagnostic questions to estimate the server CPU, RAM and storage you need with transparent pricing.
Cloud Infrastructure Engineer.
Related Posts
Cloud HostingVPS vs Cloud Hosting: What’s the Difference and Which Do You Need?
A VPS is a virtual server you manage; cloud hosting is usually a managed platform. The real differences in access, management, scaling and cost, and how to choose.
Cloud HostingFirebase Alternatives in 2026: Backends With Your Own Database
Why teams leave Firebase, what the free Spark plan covers, and the alternatives: Supabase, Appwrite, PocketBase, Nhost or your own API with a private database.
Cloud HostingPython Web Hosting in 2026: Where to Host Flask, FastAPI and Django Apps
What a Python web app needs in production (Gunicorn or Uvicorn, a database, HTTPS) and where to host Flask, FastAPI and Django in 2026, with prices checked.