Custom Domains
Connect your own domain to any ZeroDeploy site with automatic SSL.
How It Works
Connecting a custom domain takes just two steps:
- Add the domain to your site
- Add a CNAME record pointing to
zerodeploy.app
ZeroDeploy detects the CNAME and automatically verifies ownership and provisions SSL — no separate verification step needed.
Step 1: Add Domain
# In a project directory with zerodeploy.json:
zerodeploy domain add example.com
# Or specify explicitly:
zerodeploy domain add example.com --site my-site
This registers the domain and starts SSL provisioning.
Step 2: CNAME Record
Add a CNAME record to your domain’s DNS pointing to zerodeploy.app:
For subdomains (e.g., www.example.com, app.example.com):
| Type | Name | Value |
|---|---|---|
| CNAME | www | zerodeploy.app |
For root/apex domains (e.g., example.com):
| Type | Name | Value |
|---|---|---|
| CNAME | @ | zerodeploy.app |
www.example.com and set up a redirect.
Verify (Optional)
ZeroDeploy automatically detects when your CNAME is in place. You can also trigger a manual check:
zerodeploy domain verify example.com
Or use the dashboard — it polls automatically and shows a “Domain connected!” confirmation once DNS propagates.
www/Root Domain Redirects
Configure automatic redirects between your www and root domain:
# Redirect www.example.com → example.com (root domain)
zerodeploy domain redirect example.com --mode www_to_apex
# Redirect example.com → www.example.com
zerodeploy domain redirect example.com --mode apex_to_www
# Disable redirect
zerodeploy domain redirect example.com --mode none
Both domains must be added and verified for redirects to work.
Managing Domains
List Domains
zerodeploy domain list
Remove a Domain
zerodeploy domain remove example.com
Via API
# List domains
curl -H "Authorization: Bearer $TOKEN" \
"https://api.zerodeploy.dev/sites/my-site/domains"
# Add domain
curl -X POST -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"domain": "example.com"}' \
"https://api.zerodeploy.dev/sites/my-site/domains"
# Verify domain
curl -X POST -H "Authorization: Bearer $TOKEN" \
"https://api.zerodeploy.dev/sites/my-site/domains/<id>/verify"
SSL Certificates
SSL certificates are automatically provisioned and renewed via Cloudflare. No manual configuration is needed:
- Certificates are issued within minutes of domain verification
- Renewal is automatic
- All traffic is served over HTTPS
- HTTP requests are automatically redirected to HTTPS
Plan Limits
| Feature | Free | Pro |
|---|---|---|
| Custom domains per site | 0 | 3 |
| SSL certificates | Included | Included |
| www/root domain redirects | — | Included |