How to host a static website from a ZIP — free subdomain and custom domain
August 31, 2026 7 min read
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.
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.
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 guide.
For a Next.js static export
Add output: 'export' to next.config.js, run next build, and zip the out/ folder that appears.
Step 2: upload and get your subdomain
- Sign in to Link in Seconds 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 — every relative link resolves from the same root they resolved from locally.
Step 3: connect your own domain (Pro)
If you want the site at yourname.com or a subdomain like docs.yourcompany.com, connect it in the site settings on a Pro account. 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 — Namecheap, Cloudflare, GoDaddy, etc.). DNS changes usually propagate within minutes to an hour.
- SSL is provisioned automatically for the custom domain too — you do not need to manage certificates manually.
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. For larger documentation sites or asset-heavy builds, Lifetime (25 sites, 1,000 files, 250 MB total) gives more room.
- 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
Pro is $7/mo or $29/yr, and covers up to 10 hosted sites plus all the other Pro controls (password links, view analytics, custom slugs, and more). Lifetime is $49 once — pay once and host up to 25 sites forever, with 250 MB per site and no renewal to track. See the full comparison on the pricing page.
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 has the framework-specific details, and the static-site hosting page is the starting point for any ZIP upload.
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 →