# How to share an HTML file as a working web page

Why an attached HTML file doesn’t show the page, what the file needs, and how to publish it as a link people can open on any phone.

By artifact.guru team. Published 2026-10-04, updated 2026-10-05.

**Short answer:** An HTML file becomes a page only when a browser loads it from a web address. Attach it to an email or put it in a file-sharing app, and it usually arrives as a download or a page of code, often without its images. Publish it instead. Drop the file on artifact.guru, zipped if the site has several files, or ask your agent to publish it. Choose who can open the link and send it; later changes go to the same link. A page that needs a server, a database or secret keys needs a real host.

## Four things to sort out

- **Make it open as a page.** It needs a web address, not an attachment.
- **Give it everything it needs.** One self-contained file, or a folder or zip with its styles and images.
- **Choose who can open it.** Your team, invited people, anyone with a code, or anyone at all.
- **Keep it current.** Changes should reach the link you already sent.

In the website draft below, click the brown mug to try it in another glaze, then add it to the basket.

## Why an attachment doesn’t show the page

Sample website draft: [Harbor Kiln website](https://artifact.guru/examples/harbor-kiln-website). The pottery studio is reviewing its new site before launch. The shop and workshop booking already work.

The Harbor Kiln draft is a whole pottery shop in one HTML file, with a basket, a workshop calendar and a newsletter signup. Open it from a link and all of that works. Email the same file and it usually arrives as a download or a page of code.

HTML is a set of instructions for a browser, and the page exists only once a browser loads it from a web address. Email and chat apps treat an attachment as a document to download or preview. Running scripts from someone else’s attachment would be a security risk, so previews tend to show the code, or the text without its scripts. File-sharing apps store the file; most show its code or offer a download instead of running it.

Even if the file does open from a downloads folder, anything it loads by a relative path is missing, such as `styles.css` or `photos/mug.jpg`. Those files stayed on your computer.

## Check what the file needs

| Your page | What to publish |
| --- | --- |
| Everything inside one `.html` file | The file as it is |
| Loads libraries or fonts from other sites by full address (esm.sh, jsDelivr, unpkg) | The file as it is |
| Uses local CSS, scripts or images | The folder, or a `.zip` with `index.html` at the top |
| A built app (Vite, Next export) | The build folder. Set relative asset paths, such as Vite’s `base: "./"`. |
| Needs a server, database or secret keys | A real host. See the last section. |

> **Easiest path.** Ask your agent for “a single self-contained HTML file” and the folder question goes away, because styles and scripts go inline.

## Publish it

1. **Sign in to artifact.guru** Or create your workspace.
2. **Drop the file on the page** Or use **Upload files**. For a site with several files, use **Upload folder**, or drop the `.zip`.
3. **Open it to check** The preview runs the page as visitors will see it. It starts **Private**, so only your workspace can open it.

From an agent, connect artifact.guru once with this address, then ask in plain words:

MCP server:

```
https://mcp.artifact.guru/mcp
```

- “Publish harbor-kiln.html to artifact.guru and give me the link.”
- “Zip the dist folder and publish it to artifact.guru as one site, privately.”

A single HTML page is text, so any connected agent can publish it, chat apps included. A zipped site travels as a file, which takes an agent that can upload files, such as Claude Code, Codex, Gemini CLI or Grok Bot.

## Choose who can open it

| Situation | Mode | What they do |
| --- | --- | --- |
| A draft for your own team | **Private** | Sign in to the workspace |
| A client review with named people | **Email** | Sign in with the invited address |
| A quick review, no accounts | **Secret code** | Type the code you sent |
| A finished page for anyone | **Public** | Just open it |

Changing the mode never changes the link, so you can send it first and open it up later. Switching back to **Private** stops outside access at once. The Harbor Kiln draft is shared with a secret code. For more, see [Choose who can open your link](https://artifact.guru/blog/choose-who-can-open) and [How to password-protect an HTML file](https://artifact.guru/blog/password-protect-html-file).

## What recipients see on a phone

A secret-code link opens on “Enter the code”, with a box for the eight characters and an **Open** button. An Email link shows “Sign in to open”. They tap **Continue** and type the invited address, and a one-time code arrives by email. There’s no password and no plan. A public link opens straight away.

Then the page runs under a slim bar with its title, **Copy link** and **Download**. For a website draft, switch off **Show controls** in the Share panel so it fills the screen like the real site. Whether it fits a phone is up to the HTML, so ask your agent for a responsive page and check it on yours.

Pasted into a chat app, a public link unfolds into a card with its title. Code and Email links show a plain “Protected link” or “Invite-only link” card, without the title.

## Update it

Edit the page in the app, where HTML opens as source beside a live preview. Or ask your agent: “In the Harbor Kiln draft, change the wheel taster to £58. Change nothing else.” Your agent can also publish a new file to the same artifact. Each change is a new version at the same link, and readers see it the next time they open the link or reload an open tab. If something breaks, use **Roll back** in the Versions list. There’s more in [Update a page you’ve already shared](https://artifact.guru/blog/update-without-new-link).

## Limits

- One HTML page or React component: up to 5 MB. A zipped site: 25 MB zipped and 64 MB unzipped. A folder upload: 100 MB, up to 1000 files.
- Pages run in a sandbox on a separate domain, with no cookies. `localStorage` works but lives in memory, so it resets when the page reloads.
- There’s no server behind the page. Point forms at a form service by its full address, or use an email link.
- Anyone who can open the page can read its source.
- Shared pages ask search engines not to index them.

## When you need a real host instead

artifact.guru serves your files; it doesn’t run code on a server. Use a real host when the page needs:

- **A server or a database:** accounts, saved orders, or bookings that other visitors see.
- **Secret keys:** an API key inside the page is readable by everyone who opens it.
- **Real payments:** a checkout connected to a payment provider.
- **Search traffic:** shared pages ask search engines to stay away, so a site that should be found belongs elsewhere.

> **A draft, not the shop.** The Harbor Kiln draft shows where the line falls. **Check out** says “Checkout isn’t connected in this draft”, and the workshop booking and newsletter signup only confirm in the browser. The live shop needs a host with a payment provider behind it.

## Questions

### Can I share an HTML file without making it public?

Yes. Keep it private to your workspace, invite people by email, or add a secret code. Only public links open for anyone.

### Will the scripts in my page run?

Yes. JavaScript runs as it would on any website, inside a sandbox that keeps it away from your account and your visitors’ cookies.

### Can people download the original file?

With controls on, the shared link has a **Download** button. Turn controls off to show the page full screen without it. The source is still visible to anyone who can open the page.

### Will search engines find it?

Shared pages and files ask search engines not to index them, on artifact.guru and on your own domain. A public link still opens for anyone who has it.

Source: https://artifact.guru/blog/share-html-file
