# Host an HTML file

Drop an HTML file, a folder or a zip and get a live https link in seconds. No account needed to try it; keep the site free with one click.

On the web at https://lobsite.com/host-html

```sh
curl --data-binary @index.html https://lobsite.com/api/v1/drop
```

Or from a terminal: this uploads one file and answers with its URL.

You have an `.html` file and want a link to send someone. Drop it in the box above and you get a live `https://…lobsite.app` address in a few seconds, with nothing to install and no account to make first.

## How it works

1. **Drop the file** (or a folder, or a `.zip`) on the box above. It's checked in your browser first: size, file count and anything that can't be published.
2. **Press Publish it.** The files go to Lobsite and come back as a site at a random address such as `quiet-fox-4821.lobsite.app`, with HTTPS.
3. **Keep it, or let it go.** The site stays up for 6 hours. **Keep it free →** moves it to a free account with the same address, and it stops expiring.

## One file, or a whole site

- **A single page.** If the file isn't called `index.html`, it's published as `index.html`, so it opens at the site's address instead of showing "Not found". Styles and scripts inside the file work as they are.
- **A page with images and CSS.** Drop the folder, not just the HTML. Links like `src="img/logo.png"` keep working because the folder's layout is kept. If the folder has a single folder inside it, that inner folder becomes the top of the site.
- **A zip.** Drop the `.zip` itself; it's opened in your browser and published as its contents. To see what's inside first, and why a file would be left out, use the [ZIP Viewer](https://lobsite.com/tools/zip-viewer).
- **Pasted code.** Switch the box to **Paste HTML**, or use the [HTML Viewer](https://lobsite.com/tools/html-viewer), which also shows a live preview on desktop, tablet and phone widths.

Every other `.html` file becomes a page at its own path: `about.html` opens at `/about`.

## What gets left out

A site without an account can have up to 500 files, 5 MB per file and 50 MB in total; this page sends up to 25 MB at once. Secret files (`.env`, private keys and similar) are always left out, and so are PDFs and executables, which need the paid plan. Sites without an account aren't indexed by search engines. Every number is on the [limits](https://lobsite.com/docs#limits) table.

## From a terminal

The command at the top uploads one file with curl and answers with the URL and the claim link:

```sh
curl --data-binary @index.html https://lobsite.com/api/v1/drop
```

For a folder, `npx lobsite` deploys it and remembers the site in `lobsite.toml`, so the next run updates the same address and uploads only the files that changed.

## Ways to put an HTML file online

| | Lobsite | GitHub Pages | Netlify Drop |
|---|---|---|---|
| Account before the first link | No: live for 6 hours, then keep it free | Yes, and a repository | No: claim it within the window |
| How you publish | Drop a file or folder, or one command | Commit and push, then turn Pages on | Drop a folder |
| Forms without a backend | Yes, once the site is in an account | No | Yes (Netlify Forms) |
| Custom domain | Paid plan, coming soon | Yes, free | Yes, free |
| Sites on the free plan | 1 | One per repository | Several |

GitHub Pages and Netlify are the better fit if you need a custom domain for free today. Lobsite is the quickest from a file to a link, and the same site keeps working with `npx lobsite` once it grows.

## Frequently asked questions

### Is it free to host an HTML file here?

Yes. Publishing without an account is free and lasts 6 hours. Keeping the site is free too: a free account holds one site, with 10 GB of bandwidth a month.

### Do I need an account?

Not to publish. You need one only to keep the site past 6 hours: press **Keep it free →** and sign in or sign up; the address stays the same.

### Why does my page show "Not found"?

The site's address opens `index.html`. A single file is renamed for you, but a folder needs an `index.html` at its top. Rename the main page, or drop the folder that contains it.

### Can I update the page after publishing?

Yes. Drop the new version on this page in the same browser and press **Update**: the same address shows the new version. Once the site is in your account, deploy changes from the dashboard or with `npx lobsite`.

### Can I host a PDF or a file to download?

Not on the free plan or without an account: PDFs and executables need the paid plan, which is coming soon. HTML, CSS, JavaScript, images and fonts all work.

