<!DOCTYPE html>

[Link in Seconds](https://linkinseconds.com/)

[Pricing](https://linkinseconds.com/pricing)

[Log in](https://linkinseconds.com/login)[Sign up free](https://linkinseconds.com/signup)

[All articles](https://linkinseconds.com/blog)

# How to deploy a React or Vite build the easy way

[Sunny](https://linkinseconds.com/about#who-runs-this)·August 31, 2026· 7 min read

[#hosting](https://linkinseconds.com/blog/topic/hosting-and-websites)[#ai](https://linkinseconds.com/blog/topic/ai-agents-and-developers)#deploy#react#vite

Deploy a React or Vite build

dist.zip Live

/p/app

You ran **npm run build**, watched it churn, and got a **dist/** folder. That folder _is_ your app: every route, every component, compiled down to static files. The only thing between it and a public URL is "somewhere to put it," and that step is usually wrapped in far more ceremony than it needs. Here's the easy way, plus the two details that actually matter for a front-end build.

## Your build is already a static site

This is the key realization: a production front-end build is, by design, a [folder of static files you can host from a ZIP](https://linkinseconds.com/blog/host-a-static-website-from-a-zip). Vite writes **dist/**, Create React App writes **build/**, a static export writes **out/**. Each is an **index.html** plus fingerprinted JavaScript and CSS bundles and your assets. No server is required to serve them. So you don't need a deploy platform with a build pipeline; you just need [somewhere to drop the files](https://linkinseconds.com/share-files-online).

## The easy way

Try it while you are reading

Upload a file and get a clean, trackable link with a QR code. Free, and no account for whoever opens it.

[Create a link](https://linkinseconds.com/)

- **Build.** Run **npm run build** (or your tool's equivalent).

- **Zip the output folder.** Compress **dist/** (Vite), **build/** (CRA), or **out/** (static export). Zipping the whole project is fine too. The output folder is detected automatically.

- **Upload the ZIP.** Every file is served with the right type: your bundle as **text/javascript**, styles as **text/css**, fonts as **font/woff2**, which is exactly what the browser needs to boot the app.

- **Turn on SPA mode, add your domain.** Enable single-page-app fallback for client-side routing, and on Pro connect your own domain with automatic SSL.

## Detail #1: client-side routing needs a fallback

A single-page app routes in the browser. Your React Router or Vue Router owns **/dashboard** and **/settings**. There are no **dashboard.html** files on disk. So when a visitor opens a deep link directly, or hits refresh on an inner page, the server has to hand back **index.html** so your router can take over. That's what **single-page-app mode** does: unknown paths fall back to index.html with a 200, so refreshes and shared deep links resolve instead of returning a 404. If you're building a plain multi-page site, leave it off and unknown paths return a real 404 (or your own **404.html**).

Symptom to recognize: the app works when you click into a route from the home page, but a hard refresh or a pasted deep link 404s. That's the SPA fallback missing. Turn it on and it's fixed.

## Detail #2: caching hashed bundles the right way

Your bundler fingerprints filenames (**index.4f3a9c2b.js**) precisely so they can be cached aggressively: the name changes whenever the contents do. The correct setup caches those content-hashed assets with a **one-year immutable** cache, so repeat visits load instantly from cache, while **index.html** is served **no-cache** so a new deploy shows up immediately. Done right, you get the speed of hard caching without the classic stale-HTML bug where an old page points at bundles that no longer exist. Ship an update by uploading a fresh ZIP: same URL, new version on the next load.

## What's out of scope

Static hosting serves your built files and nothing else. Calls from the browser to an external API over HTTPS keep working. What doesn't: anything that needs a server at request time, such as Next.js server components rendered per request, SvelteKit endpoints, server middleware, secrets read on the server. For those, export a fully static build or use a platform that runs the server. Bring built static output and you get a [fast, simple host on its own subdomain](https://linkinseconds.com/blog/host-website-zip-free-subdomain) (website hosting is on Pro); bring a server-dependent app and this is the wrong tool.

## Ship it

Build, zip **dist/**, and drop it on the [deploy a Vite or React build](https://linkinseconds.com/deploy-vite-react-build) page. If you just want a built site online in general, the [host a static website](https://linkinseconds.com/host-static-website) guide covers the same flow, and [publish an HTML ZIP](https://linkinseconds.com/publish-html-zip) is the plain-HTML version.

## Keep reading

- [Share an HTML file as a live link report.html Live /p/report How to share an HTML file as a link that opens as a web page 7 min read](https://linkinseconds.com/blog/share-an-html-file-as-a-link)

- [Share an AI-built website as a link site.zip Live /p/site Share a website you built with AI as a live link 4 min read](https://linkinseconds.com/blog/share-an-ai-built-website-as-a-link)

- [Tiiny Host's free plan limits index.html Live /p/landing Tiiny Host free plan limits (2026): 3 MB uploads, one site, and the 3-month login rule 6 min read](https://linkinseconds.com/blog/tiiny-host-free-plan-limits)

## Turn any file into a link in seconds

Upload a PDF, image, video, or ZIP and get a clean, trackable link with a QR code, free.

[Try Link in Seconds →](https://linkinseconds.com/)

On this page

- Your build is already a static site

- The easy way

- Detail #1: client-side routing needs a fallback

- Detail #2: caching hashed bundles the right way

- What's out of scope

- Ship it

[Link in Seconds](https://linkinseconds.com/)

Turn photos, PDFs and files into one clean link to share, with view tracking and a QR code. Works in the browser, nothing to install.

[Follow on LinkedIn](https://www.linkedin.com/company/linkinseconds)

Featured on

33, Bhaktinandan, Sector 4, S G Road, Mota Varachha, Surat, Gujarat 394101, India

[+91 99090 97776](tel:+919909097776)

[support@linkinseconds.com](mailto:support@linkinseconds.com)

Secured by Dodo PaymentsVisaMastercard

Use cases

- [Wedding photos](https://linkinseconds.com/wedding)

- [Event photos](https://linkinseconds.com/event-photo-sharing)

- [Family photos](https://linkinseconds.com/share-photos-with-family)

- [Client proofs](https://linkinseconds.com/client-photo-proofs)

- [Property listings](https://linkinseconds.com/property-listing-link)

- [Product catalogue](https://linkinseconds.com/product-catalogue-link)

- [Pitch decks](https://linkinseconds.com/share-pitch-deck)

- [Resume link](https://linkinseconds.com/resume-link)

- [Portfolio link](https://linkinseconds.com/portfolio-link)

- [Class photos](https://linkinseconds.com/class-photos)

- [All use cases](https://linkinseconds.com/use-cases)

Tools

- [Image to link](https://linkinseconds.com/image-to-link)

- [PDF to link](https://linkinseconds.com/pdf-to-link-converter)

- [Video to link](https://linkinseconds.com/video-to-link)

- [Share files online](https://linkinseconds.com/share-files-online)

- [QR code generator](https://linkinseconds.com/qr-code-generator)

- [Large files by email](https://linkinseconds.com/send-large-files-via-email)

- [View-only sharing](https://linkinseconds.com/view-only-file-sharing)

- [Menu QR code](https://linkinseconds.com/pdf-menu-qr-code)

- [Proposal tracking](https://linkinseconds.com/proposal-tracking)

- [All file viewers](https://linkinseconds.com/viewer)

PDF tools

- [Merge PDF](https://linkinseconds.com/merge-pdf)

- [Split PDF](https://linkinseconds.com/split-pdf)

- [Rotate PDF](https://linkinseconds.com/rotate-pdf)

- [Organise PDF](https://linkinseconds.com/organize-pdf)

- [Watermark PDF](https://linkinseconds.com/watermark-pdf)

- [JPG to PDF](https://linkinseconds.com/jpg-to-pdf)

- [PDF to JPG](https://linkinseconds.com/pdf-to-jpg)

- [All PDF tools](https://linkinseconds.com/pdf-tools)

Hosting

- [Host a static site](https://linkinseconds.com/host-static-website)

- [HTML hosting](https://linkinseconds.com/html-hosting)

- [Publish an HTML ZIP](https://linkinseconds.com/publish-html-zip)

- [Deploy a Vite build](https://linkinseconds.com/deploy-vite-react-build)

- [Publish from AI (MCP)](https://linkinseconds.com/docs/mcp)

- [File upload API](https://linkinseconds.com/docs/api/uploads)

Compare

- [vs WeTransfer](https://linkinseconds.com/wetransfer-alternative)

- [vs Dropbox](https://linkinseconds.com/dropbox-alternative)

- [vs Google Drive](https://linkinseconds.com/google-drive-alternative)

- [vs Tiiny Host](https://linkinseconds.com/tiiny-host-alternative)

- [vs DocSend](https://linkinseconds.com/docsend-alternative)

- [vs Google Photos](https://linkinseconds.com/google-photos-alternative)

- [vs Pixieset](https://linkinseconds.com/pixieset-alternative)

- [vs Netlify Drop](https://linkinseconds.com/netlify-drop-alternative)

- [vs Smash](https://linkinseconds.com/smash-alternative)

- [vs Issuu](https://linkinseconds.com/issuu-alternative)

Company

- [Pricing](https://linkinseconds.com/pricing)

- [Blog](https://linkinseconds.com/blog)

- [FAQ](https://linkinseconds.com/faq)

- [About](https://linkinseconds.com/about)

- [Contact](https://linkinseconds.com/contact)

- [Contact sales](https://linkinseconds.com/contact-sales)

- [Docs](https://linkinseconds.com/docs)

- [API & MCP](https://linkinseconds.com/docs/developers)

Legal

- [Terms](https://linkinseconds.com/terms)

- [Privacy](https://linkinseconds.com/privacy)

- [Cookies](https://linkinseconds.com/cookies)

- [Refunds](https://linkinseconds.com/refunds)

- [Acceptable use](https://linkinseconds.com/acceptable-use)

- [Copyright](https://linkinseconds.com/dmca)

- [Report abuse](https://linkinseconds.com/abuse)

- [Child safety](https://linkinseconds.com/child-safety)

- [Grievance](https://linkinseconds.com/grievance)

- [Security](https://linkinseconds.com/security)

- [Legal notice](https://linkinseconds.com/legal-notice)

© 2026 Link in Seconds. All rights reserved.

[Terms](https://linkinseconds.com/terms)[Privacy](https://linkinseconds.com/privacy)[Cookies](https://linkinseconds.com/cookies)

Source: https://linkinseconds.com/blog/deploy-a-react-vite-build-the-easy-way
