# Deploying Frontend Apps

> Host static and server-rendered apps on Vercel, Netlify or Cloudflare with preview deployments, custom domains, rollbacks and monitoring. Free notes, key...

Canonical: https://www.internhack.in/roadmaps/tracks/frontend/deployment
Last updated: 2026-11-28

Host static and server-rendered apps on Vercel, Netlify or Cloudflare with preview deployments, custom domains, rollbacks and monitoring.

Intermediate · about 4 hours · difficulty 2/5

Learn first: [HTTP Caching, Compression and CDNs](https://www.internhack.in/roadmaps/tracks/frontend/caching), [Git and GitHub](https://www.internhack.in/roadmaps/tracks/frontend/git)

A project nobody can open is not a portfolio piece. Modern frontend hosting makes deployment almost effortless, but you still need to understand what is being deployed and how it behaves in production.

### What you deploy

- **Static builds** (a Vite SPA, an Astro or SSG site): a folder of HTML, JS, CSS and assets served from a CDN. Configure an **SPA fallback** so deep links serve `index.html`.
- **Server-rendered apps** (Next.js, Nuxt, SvelteKit, React Router): code that also runs on servers, serverless functions or edge runtimes.

### Platforms

- **Vercel**: first-class Next.js support, previews per pull request and edge functions.
- **Netlify**: great for static and Jamstack sites, forms, functions and redirects files.
- **Cloudflare Pages / Workers**: a global edge network, generous free tier, edge-first runtime.
- **GitHub Pages** for purely static projects; containers on any cloud when you need full control.

### Everyday features

- Connect the Git repository: every push to `main` deploys production, every pull request gets a **preview URL** for review.
- **Custom domains** with automatic HTTPS, redirects, rewrites and custom headers (security and caching).
- **Instant rollbacks** to a previous deployment.
- **Monitoring**: error tracking (Sentry or similar) with uploaded source maps so stack traces are readable, plus analytics and Core Web Vitals from real users.

### Pitfalls

Refreshing a deep link returns 404 (missing SPA fallback); build succeeds locally but fails in CI (different Node version, case-sensitive imports); unreadable production errors (no source maps); and surprise bills from unbounded serverless usage.

### Good enough to move on

You have deployed at least one SPA and one server-rendered app with custom domains, previews on pull requests, security and caching headers, and error tracking with source maps.

## Key concepts

- **Static vs server-rendered deployments**
- **Vercel**
- **Netlify**
- **Cloudflare Pages and Workers**
- **Preview deployments**
- **Custom domains, redirects and headers**
- **SPA fallback routing**
- **Rollbacks**
- **Error tracking with source maps**

## Mini project

Deploy your React app to Vercel or Netlify and a static site to Cloudflare Pages, each with a custom domain, preview deployments on pull requests, caching and security headers, and Sentry error tracking with source maps.

## Check yourself

Your SPA works when you navigate from the home page but /settings returns 404 on refresh. Why, and how do you fix it on the host?

## Free resources

- [Vercel Documentation](https://vercel.com/docs) (Vercel)
- [Netlify Docs](https://docs.netlify.com/) (Netlify)
- [Cloudflare Pages](https://developers.cloudflare.com/pages/) (Cloudflare)
- [Deploying a Static Site](https://vite.dev/guide/static-deploy) (Vite)

Previous: [Internationalisation and Localisation](https://www.internhack.in/roadmaps/tracks/frontend/i18n) · Next: [Environment Variables and Configuration](https://www.internhack.in/roadmaps/tracks/frontend/env-config)

## More in Shipping to Production and Beyond

- [Deploying Frontend Apps](https://www.internhack.in/roadmaps/tracks/frontend/deployment)
- [Environment Variables and Configuration](https://www.internhack.in/roadmaps/tracks/frontend/env-config)
- [Continuous Integration for Frontend Projects](https://www.internhack.in/roadmaps/tracks/frontend/frontend-ci)
- [Mobile Apps with React Native](https://www.internhack.in/roadmaps/tracks/frontend/react-native)
- [Desktop Apps with Electron and Tauri](https://www.internhack.in/roadmaps/tracks/frontend/desktop-apps)
- [Capstone: A Production-Grade Frontend Application](https://www.internhack.in/roadmaps/tracks/frontend/capstone)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Frontend Developer Roadmap](https://www.internhack.in/roadmaps/tracks/frontend)
