Custom Domains
Connect your own domain to any ZeroDeploy site with automatic SSL certificates.
Overview
Custom domains allow you to serve your deployed sites from your own domain (e.g., www.example.com) instead of the default *.zerodeploy.app subdomain.
The setup process is a single step: add a CNAME record pointing to zerodeploy.app. ZeroDeploy detects the CNAME and automatically verifies ownership and provisions SSL.
Quick Start
Here's the complete workflow to add a custom domain:
# Step 1: Add the domain
zerodeploy domain add www.example.com
# Step 2: Add the CNAME record to your DNS (shown in output)
# CNAME → zerodeploy.app
# Step 3: Verify (or wait — the dashboard auto-detects it)
zerodeploy domain verify www.example.com
# Your site is now live at https://www.example.com domain add
Add a custom domain to a site. This initiates the verification process.
zerodeploy domain add <domain> [options]
| Argument | Description |
|---|---|
domain | The domain to add (e.g., www.example.com or example.com) |
| Option | Description |
|---|---|
--site <site> | Site (defaults to config/env) |
zerodeploy domain add www.example.com domain verify
Verify domain ownership by checking that the CNAME record points to zerodeploy.app. The dashboard auto-polls, so this is optional.
zerodeploy domain verify <domain> [options]
| Option | Description |
|---|---|
--site <site> | Site (defaults to config/env) |
--json | Output as JSON for scripting |
zerodeploy domain verify www.example.com domain list
List all custom domains configured for a site.
zerodeploy domain list [options]
| Option | Description |
|---|---|
--site <site> | Site (defaults to config/env) |
--json | Output as JSON for scripting |
zerodeploy domain list domain remove
Remove a custom domain from a site.
zerodeploy domain remove <domain> [options]
| Option | Description |
|---|---|
--site <site> | Site (defaults to config/env) |
zerodeploy domain remove www.example.com domain redirect
Set redirect mode for a custom domain. This allows automatic redirects between www and root (non-www) domains.
zerodeploy domain redirect <domain> --mode <mode> [options]
| Option | Description |
|---|---|
--site <site> | Site (defaults to config/env) |
--mode <mode> | Redirect mode: none, www_to_apex, or apex_to_www |
--json | Output as JSON for scripting |
Redirect Modes
none- No automatic redirects (default)www_to_apex- Redirectwww.example.comtoexample.com(root domain)apex_to_www- Redirectexample.comtowww.example.com
# Redirect www.example.com to example.com
zerodeploy domain redirect example.com --mode www_to_apex
# Redirect example.com to www.example.com
zerodeploy domain redirect www.example.com --mode apex_to_www
# Disable redirects
zerodeploy domain redirect example.com --mode none DNS Configuration Guide
Subdomains (www.example.com)
For subdomains like www, app, or docs, add a standard CNAME record:
Type: CNAME
Name: www (or your subdomain)
Target: your-site.zerodeploy.app Root Domains (example.com)
Root domains require special handling since DNS doesn't officially support CNAME records at the root level.
If using Cloudflare (Recommended)
Cloudflare supports CNAME flattening, which allows CNAME records at the root:
Type: CNAME
Name: @ (or example.com)
Target: your-site.zerodeploy.app
Proxy: ON (orange cloud) SSL Certificates
ZeroDeploy automatically provisions SSL certificates for verified custom domains through Cloudflare. No manual configuration is required.
- Certificates are issued automatically after domain verification
- Certificates auto-renew before expiration
- All traffic is served over HTTPS