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

# How to host a static website from a ZIP, with a subdomain and custom domain

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

[#hosting](https://linkinseconds.com/blog/topic/hosting-and-websites)#host#website#zip#free

You built a static site (a landing page, a portfolio, a documentation site, the **dist/** output of a Vite or React build) and you want it online right now. Not tomorrow after fighting DNS. Not after learning a new platform's config format. Right now, with a real URL and a proper SSL certificate. Here is the fastest version of that, including how to point your own domain at it once you have confirmed it looks right. If you also need to [share files online](https://linkinseconds.com/share-files-online) without hosting a whole site, a single clean link is often enough.

## What this works for

Any website whose files are complete before a visitor arrives is a static site. That covers a wide range of useful things:

- Hand-coded HTML pages with CSS and JavaScript

- Framework builds: the **dist/** from Vite, the **build/** from Create React App, the **out/** from Next.js static export

- Documentation sites built with Docusaurus, Astro, VitePress, or Hugo

- Landing pages and portfolio sites

- Single-page apps (SPAs) with client-side routing

What it does **not** work for: server-rendered code, PHP, Python scripts, Node.js server routes, or anything that needs to run on a server when a request arrives. If your site is just files, you are in the right place. If all you have is a single asset rather than a whole site, it is faster to turn that [PDF into a link](https://linkinseconds.com/pdf-to-link-converter) or that [image into a link](https://linkinseconds.com/image-to-link) directly, with no ZIP step at all.

## Step 1: zip your site correctly

The most common mistake is zipping the wrong folder. Here is the rule: zip the folder that contains your **index.html**, not a parent folder with the project source, build scripts, and **node_modules** inside it.

### For a hand-coded site

Zip the folder that has **index.html** at its root, with your CSS, images, and JS files alongside it or in subfolders. Every relative path in your HTML should resolve from that root.

### For a Vite or React build

Run **npm run build** or **pnpm build** first. Then zip the **dist/** folder (Vite) or **build/** folder (Create React App). Do not zip your source. Zip the _built output_. The step-by-step for React/Vite specifically is covered in the [deploy a React or Vite build the easy way](https://linkinseconds.com/blog/deploy-a-react-vite-build-the-easy-way) guide.

### For a Next.js static export

Add **output: 'export'** to **next.config.js**, run **next build**, and zip the **out/** folder that appears.

**Check before you zip:** open the folder on your desktop and confirm you see **index.html** at the top level, not buried inside a subfolder called **dist** inside a folder called **my-project**. The wrong nesting is the single most common cause of a blank or broken site after upload.

Try it while you read

Drop any file here and get a clean link with a QR code in seconds.

Drop your file here

Drop several at once and they become one album link

or paste an image Ctrl+V

Up to 10 GB per file. 7-day free trial, then $9/mo + tax. $0 today, cancel anytime.

## Step 2: upload and get your subdomain

- Sign in to [Link in Seconds](https://linkinseconds.com/host-static-website) and open the static-site hosting page.

- Drop the ZIP onto the upload card. The site is unpacked server-side: your **index.html** is found at the root, every asset is laid out in the correct folder structure, and each file is served with the right content type (CSS as **text/css**, JavaScript as **text/javascript**, fonts as the appropriate font type, and so on).

- Your site goes live at a clean subdomain: **your-chosen-name.linkinseconds.site**, with HTTPS included automatically. No certificate to provision, no Certbot to run.

- Open the URL, click through your pages, and check that the CSS applies and scripts run. They should, because every relative link resolves from the same root they resolved from locally.

## Step 3: connect your own domain

If you want the site at **yourname.com** or a subdomain like **docs.yourcompany.com**, connect it in the site settings. The process:

- In your site settings, enter your custom domain. You will see a DNS record to add, typically a CNAME pointing your domain at the hosted site.

- Add the record in your DNS provider (wherever you bought the domain, like Namecheap, Cloudflare, or GoDaddy). DNS changes usually propagate within minutes to an hour.

- SSL is provisioned automatically for the custom domain too, so you do not need to manage certificates manually.

**Tip:** keep the subdomain live while you wait for DNS. The **your-name.linkinseconds.site** address continues to work in parallel, so you can share a working preview link before the custom domain fully propagates.

## Single-page apps and client-side routing

SPAs (React Router, Vue Router, etc.) serve **index.html** for every URL and handle routing entirely in the browser. The problem is that a server that sees a request for **/about** looks for a file at that path, and when it does not exist, returns a 404 instead of serving **index.html**. Static hosting handles this with a fallback: any URL that does not match a real file serves **index.html**, and your router takes it from there. Enable the **single-page app** toggle in the site settings and client-side routing works as expected.

## Updating the site without changing the URL

Sites change. The best workflow for that: re-zip the built output, upload the new ZIP, and the **same URL** (subdomain and any custom domain) serves the updated site immediately. Every link you have already shared keeps working and shows the latest version automatically. No redeploy command, no git push, no build server.

## Limits to know before you start

- **Static files only.** No PHP, no Python, no server-side rendering at request time. Client-side JavaScript calling an external API over HTTPS works fine.

- **File count and size caps per site.** Pro allows up to 500 files per site with a 100 MB total decompressed size, and each individual asset must be under 25 MB. The 7-day free trial (then $9/mo, cancel anytime) and Pro take files up to 10 GB each, with 100 GB of storage.

- **Static-site hosting is a Pro feature.** You need a Pro or Lifetime account to publish a site. Signing in is always required to upload.

## Pricing

Every link feature is free. Pro adds unlimited links, 100 GB, bigger files, HTML pages and website hosting: up to 10 hosted sites, for $9/mo or $49/yrLinks are unlimited on the 7-day free trial (then $9/mo, cancel anytime) and on every paid plan; single HTML pages are part of Pro too. Lifetime is $99 onceThe 7-day free trial (then $9/mo, cancel anytime) and Pro take files up to 10 GB each, with 100 GB of storage. See the full comparison on the [pricing page](https://linkinseconds.com/pricing).

## Frequently asked questions

### Can I host a site with multiple pages, not just index.html?

Yes. Multi-page sites work as long as all the HTML files are inside the ZIP. Each page is served as its own file. **/about.html** is a real file, not a redirect. Inter-page links resolve as long as your relative paths are correct.

### What if my framework's build uses hashed asset names?

Hashed names (like **app.4f3a9c2b.js**) are served normally. The server reads the actual file and serves it with a correct content type, regardless of the filename. Hashed assets are also cached aggressively since their name changes with every build, which is exactly what you want for fast repeat visits.

### Is HTTPS included automatically?

Yes, for both the **.linkinseconds.site** subdomain and any custom domain you connect. You do not need to provision a certificate or set up a redirect.

### Can I preview before connecting a custom domain?

The subdomain is the preview. Share it, verify it looks right, and then point your domain at it. Both the subdomain and the custom domain serve the same site simultaneously.

If you are deploying a React or Vite build specifically, the [Vite/React deploy guide](https://linkinseconds.com/blog/deploy-a-react-vite-build-the-easy-way) has the framework-specific details, and the [static-site hosting](https://linkinseconds.com/host-static-website) page is the starting point for any ZIP upload.

## Keep reading

- [How to share a Claude artifact as a link (and see who opened it) 6 min read](https://linkinseconds.com/blog/share-a-claude-artifact-as-a-link)

- [How to share a Lovable, Bolt or v0 app as a link (export and host it) 6 min read](https://linkinseconds.com/blog/share-a-lovable-bolt-or-v0-app-as-a-link)

- [How to deploy a React or Vite build the easy way 7 min read](https://linkinseconds.com/blog/deploy-a-react-vite-build-the-easy-way)

## 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. Up to 10 GB per file. 7-day free trial, then $9/mo + tax. $0 today, cancel anytime.

[Start free trial →](https://linkinseconds.com/)

Optional cookies for analytics, ads and session replay. · [Privacy](https://linkinseconds.com/privacy)

Source: https://linkinseconds.com/blog/host-website-zip-free-subdomain
