Allow users to publish pages under their own subdomain:
- Current:
zenbin.io/p/my-page - New:
my-app.zenbin.ioorusername.zenbin.io
# Claim a subdomain
POST /v1/subdomains/my-app
# Publish to it (use X-Subdomain header)
POST /v1/pages/index
X-Subdomain: my-app
{ "html": "<h1>Welcome</h1>" }
# Add more pages
POST /v1/pages/about
X-Subdomain: my-app
{ "html": "<h1>About</h1>" }
# Result
→ https://my-app.zenbin.io/ (index page)
→ https://my-app.zenbin.io/about (nested page)
- Professional URLs -
my-app.zenbin.iovszenbin.io/p/my-app - Nested Pages - Root
/+ nested pages like/docs,/about - Multi-page Apps - Upload multiple pages under one subdomain
- Branding - Better for sharing and demos
- Portfolio Apps - Multiple pages = full app experience
| Endpoint | Method | Description |
|---|---|---|
/v1/subdomains/{name} |
POST | Claim a subdomain |
/v1/subdomains/{name} |
GET | Get subdomain info |
/v1/subdomains/{name} |
DELETE | Delete subdomain and all pages |
/v1/subdomains/{name}/pages |
GET | List pages in subdomain |
/v1/pages/{id} |
POST | Publish page (use X-Subdomain header) |
- 3-63 characters
- Must start with a letter
- Lowercase letters, numbers, and hyphens only
- Must end with letter or number
- Reserved names blocked (www, api, mail, etc.)
- Pages stored with composite key:
{subdomain}:{id} - Subdomains stored in separate LMDB database
- Page count tracked per subdomain
- Max 100 pages per subdomain
/p/{id}paths still work for standalone pages- Subdomain routes use Host header detection
- No auth required (anonymous claiming)
- User accounts - Optional auth for claiming/ownership
- Custom domains -
my-app.com→ zenbin - Analytics - Per-subdomain stats
- Sitemap generation - Auto-generate sitemaps
- Custom 404 pages - Per-subdomain 404 customization
- 18 subdomain-specific tests passing
- All 112 tests passing (including core API tests)
- Test coverage: claim, publish, list, delete, stats