Multi-Page Static Sites: From Directory to Live Website
Beyond single-page hosting
A single HTML file is great for demos and prototypes. But sometimes you need a full website with multiple pages — an about page, a contact form, a blog, documentation. htmlhost supports this with multi-page deploys.
How multi-page deploys work
Instead of deploying a single file, you deploy an entire directory:
my-site/
├── index.html → /
├── about.html → /about
├── contact.html → /contact
├── blog/
│ ├── post-1.html → /blog/post-1
│ └── post-2.html → /blog/post-2
└── 404.html → custom 404 page
Deploy with the CLI
cd my-site
htmlhost deploy . --pages
The --pages flag tells the CLI to treat each HTML file as a separate page within a single site. File names map directly to URL paths — no configuration needed.
Deploy via API
You can also create multi-page sites programmatically:
POST /api/sites
Content-Type: application/json
Authorization: Bearer your-api-token
{
"title": "My Website",
"pages": [
{ "path": "/", "html": "<!DOCTYPE html>..." },
{ "path": "/about", "html": "<!DOCTYPE html>..." },
{ "path": "/contact", "html": "<!DOCTYPE html>..." }
]
}
Clean URL routing
Multi-page sites use clean URLs by default:
yoursite.htmlhost.co/about— not/about.htmlyoursite.htmlhost.co/blog/post-1— nested paths work tooyoursite.htmlhost.co/— always served fromindex.html
Custom 404 pages
Add a 404.html file to your project and it will be served automatically when visitors hit a non-existent page. This lets you maintain a consistent experience even for broken links.
Page limits
There's no limit on the number of pages per site, on any plan. The only cap is your account's total storage across all your sites: 500 MB on Free and 10 GB on Pro.
When to use multi-page
Multi-page hosting is ideal for:
- Documentation sites — deploy your docs as a set of linked pages
- Personal websites — home, about, portfolio, contact
- Landing pages — a main page plus terms, privacy, and FAQ
- Course materials — each lesson as a separate page
Getting started
Create a directory with your HTML files, then deploy:
mkdir my-site
# Create your HTML files...
htmlhost deploy . --pages
Your multi-page site will be live in seconds. Read the full documentation for more details.
Ready to try it yourself?
Paste HTML, get a link. Deploy your site in under 3 seconds — no config, no build step.
Start hosting