Static sites
Host plain HTML, or a React, Vue or Svelte app built with Vite. We build it and serve its files, with SSL and a fast cache at the door.
Updated 17 Oct 20263 min read
A static site is files a browser reads as they are: HTML, CSS, JavaScript and pictures. Tanzahost serves them for you, with SSL, on a free address or your own domain. You can send plain files, or code that a bundler like Vite turns into files on every deploy.
No files yet? Start from our static site starter: one HTML page and its CSS. Choose Static site under What are you building? on a new account's home, or, in a project, Add a service, then App, and under Where's your code?, Starter, then Static site. Send your own files later with Send new code on the app's Code card.
Plain HTML
Put index.html at the top of your repository or ZIP file, or in a public folder. We see a static site and serve that folder: nothing to install, no build.
duka-launch/
index.html
styles.css
images/
logo.pngBuilt with a bundler
A Node.js project whose package.json has a build script, but no start script, no main file and no server file (server.js, server.mjs, index.js, app.js or main.js), is a site built into files: a React, Vue or Svelte app made with Vite, for example. We install its packages, run the build, and serve the folder it writes:
| Your build | We serve |
|---|---|
| Vite and most others | dist |
A build script with --outDir or --out-dir | The folder it names |
Create React App (react-scripts) | build |
Frameworks that run their own server, like Next.js, Nuxt or SvelteKit, deploy as Node.js apps instead.
We serve the files exactly as they are, with no fallback to index.html. In a React or Vue app that makes its own pages in the browser (a router), opening an address like /products/42 directly, or reloading it, finds no such file and shows "not found". Use your router's hash mode (/#/products/42), or have the build write an index.html for each page.
Example: Asha's launch page
Before her shop opened, Asha put a one-page launch site online. Her repository is a Vite project:
{
"scripts": {
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"vite": "^7.0.0"
}
}In her project duka, she chooses Add a service, then App, names it
launch, and picks the repository.We find a static site, install its packages, run
npm run build, and servedist.It's live on its free address, like
launch-duka-q4w8.tanzahost.co, with SSL.
Every push to her branch builds and deploys it again, without downtime.
What it costs
reading today's pricesHow billing works.
reading today's prices
Fast by default
Pictures, styles, scripts and fonts that your site allows to be cached are kept in memory at the door, where every visit arrives before it reaches your app, so they load fast. Each deploy clears them. See Protection and speed.
Change what we found
On the app's page, Build and run shows the build command and what we found. Set Folder when the site lives in a folder of a larger repository, or set the language to Static site in tanzahost.json to serve the files as they are:
{
"language": "static"
}