Guide / Single HTML
Host a single HTML file as a public preview
Learn the simplest way to turn one HTML file into a shareable browser URL without setting up a production hosting platform.
Updated 2026-05-11
Answer First
A single HTML file can be shared as a live page directly. Upload the .html file in the web console, paste the HTML source, or run `previewship deploy ./page.html`; PreviewShip packages it as index.html and publishes it as a static preview.
Key takeaways
- Single-file HTML is common for AI outputs, reports, and small utilities.
- A public link is easier for reviewers than an attached file.
- PreviewShip avoids production-host setup when the job is only preview sharing.
Recommended workflow
- Prepare the HTML file or copy the generated HTML source.
- Use console upload, paste HTML, CLI, or MCP.
- PreviewShip packages the file as index.html and deploys it.
- Open and share the generated preview URL.
Comparison snapshot
| Question | Single HTML preview | Full static site |
|---|---|---|
| Files required | One index.html file | HTML plus assets and routes |
| Best for | Reports, prototypes, simple tools | Larger frontend builds |
| Deploy path | Direct .html upload, paste, CLI, MCP, or editor deploy | Build output deploy |
| Review model | Fast link sharing | Broader QA workflow |
When a single file is enough
A single HTML file is enough when the page embeds its styles and scripts or references reachable external assets. This is common for AI-generated summaries, dashboards, calculators, and proof-of-concept pages.
PreviewShip supports this directly: upload the .html file, paste the source in the console, deploy it through CLI/MCP, or use the active HTML command in the VS Code/Cursor extension.
When to use a folder instead
Use a folder or zip when the HTML references local images, CSS files, JavaScript modules, fonts, or other assets. Keeping the same relative paths preserves the page exactly as it was generated.
That folder or zip should still be static output. If you have a source project, build it first and upload the generated output folder.
FAQ
- Why does the file need to be named index.html?
- Static preview hosts use index.html as the default page for a folder. PreviewShip automatically packages single HTML uploads and pasted HTML as index.html.
- Can I share an HTML file without making it public?
- PreviewShip is optimized for shareable preview URLs. If the content is sensitive, avoid publishing it publicly or use a workflow with the access controls your team requires.
- Is this the same as production hosting?
- No. This workflow is intended for preview sharing and review, not for replacing a long-term production hosting stack.