Host a single HTML/Markdown 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.
Answer First
A single HTML/Markdown file can be shared as a live page directly. Upload the .html or Markdown file in the web console, paste the HTML source, or run `previewship deploy ./page.html or ./README.md`; PreviewShip packages it as index.html and publishes it as a static preview.
Deploy build artifacts, not source-code zips.
If you upload a zip, build the project first and zip the static output folder such as dist, build, out, or public with index.html and assets. Do not zip raw React/Vue/Next source folders with package.json and node_modules. Single .html files are supported directly by console upload, pasted HTML, CLI, MCP, and the VS Code/Cursor extension.
Key takeaways
Recommended workflow
Prepare the HTML or Markdown 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
When a single file is enough
A single HTML/Markdown 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 or Markdown 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/Markdown 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.