hostess domains
Add and manage custom domains for your Hostess projects.
Description
Manage custom domains for your Hostess projects. Custom domains let you serve your applications from your own domain names (e.g., myapp.com, api.myapp.com) instead of the default *.hostess.run URLs. Hostess automatically provisions TLS certificates for custom domains via Let's Encrypt.
All services also keep their autogenerated *.hostess.run URLs regardless of any custom domain configuration.
Every write (add, update, remove) targets a specific service in a specific environment and routes traffic immediately — no redeploy required. If the target service hasn't been deployed to that environment yet, the domain takes effect automatically on its next deploy. Each command reports which of these happened.
domains list
List all custom domains configured for a project.
Usage
hostess domains list [flags]Flags
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--project | -p | string | From hostess.yml | Project name |
--token | string | Auth token |
Examples
hostess domains listDOMAIN SERVICE STATUS DNS
myapp.com frontend Active myapp.com → ingress.hostess.run
api.myapp.com api Active api.myapp.com → ingress.hostess.run
staging.myapp.com frontend Pending DNS staging.myapp.com → ingress.hostess.run# List domains for a specific project
hostess domains list --project my-other-appdomains add
Add a custom domain to a service in your project.
Usage
hostess domains add <domain> [flags]Flags
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--service | string | Required | Service to attach the domain to | |
--project | -p | string | From hostess.yml | Project name |
--env | string | Most recently created environment if omitted | Environment name | |
--token | string | Auth token |
Examples
# Add a domain to the frontend service
hostess domains add myapp.com --service frontendDomain added.
Configure your DNS:
Type: CNAME
Name: myapp.com
Value: ingress.hostess.run
Live routing updated.# Add an API subdomain
hostess domains add api.myapp.com --service api
# Add to a specific environment
hostess domains add staging.myapp.com --service frontend --env staging
# Add to a specific project
hostess domains add myapp.com --service frontend --project my-appRouting Outcomes
The line after the DNS configuration reports what happened to live traffic routing:
| Outcome | Meaning |
|---|---|
Live routing updated. | Traffic is routing to the new target now. |
This service hasn't been deployed to this environment yet — the domain will take effect on its next deploy. | Nothing to route yet; routing activates automatically on the target's next deploy. |
Live routing was NOT updated. | The domain was saved, but the routing update failed. Retry the command or redeploy the service to reconcile it. |
DNS Configuration
After adding a domain, you need to configure a CNAME record with your DNS provider:
| Record Type | Name | Value |
|---|---|---|
CNAME | myapp.com | ingress.hostess.run |
CNAME | api.myapp.com | ingress.hostess.run |
DNS changes can take up to 48 hours to propagate, though most providers update within minutes. Hostess will automatically detect when your DNS is configured correctly and issue a TLS certificate.
You can add a domain, deploy immediately, and configure DNS when ready. Your service remains accessible via its *.hostess.run URL while DNS is being configured.
Domain Validation Rules
- Use a valid RFC 1123 hostname: lowercase, no wildcard, and no scheme prefix.
- Keep domain names at or below 253 characters.
- Use each custom domain on one Hostess service.
- Attach custom domains to public application services.
domains update
Retarget an existing domain to a different service and/or environment.
Usage
hostess domains update <domain> [flags]Flags
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--service | string | Retarget to this service | ||
--env | string | Retarget to this environment | ||
--project | -p | string | From hostess.yml | Project name |
--token | string | Auth token |
At least one of --service or --env is required.
Examples
# Move a domain to a different service
hostess domains update myapp.com --service backendDomain 'myapp.com' updated.
Live routing updated.# Move a domain to a different environment
hostess domains update myapp.com --service backend --env stagingDNS verification carries over when you retarget a domain — you don't need to re-verify. To point a different hostname at a service, remove the domain and add the new one; the hostname itself can't be changed in place.
domains verify
Trigger DNS verification for a domain.
Usage
hostess domains verify <domain> [flags]Flags
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--project | -p | string | From hostess.yml | Project name |
--token | string | Auth token |
Examples
hostess domains verify myapp.commyapp.com is verified.If verification fails, the command shows the DNS record to point at:
myapp.com is not verified.
Point a CNAME record: myapp.com -> ingress.hostess.rundomains remove
Remove a custom domain from your project.
Usage
hostess domains remove <domain> [flags]Flags
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--project | -p | string | From hostess.yml | Project name |
--token | string | Auth token |
Examples
hostess domains remove old-domain.comDomain 'old-domain.com' removed.
Live routing updated.# Remove from a specific project
hostess domains remove staging.myapp.com --project my-appAfter removing a domain from Hostess, remove the matching CNAME record from your DNS provider.
Domain Lifecycle
Here's how the domain lifecycle works from start to finish:
- Add domain — Run
hostess domains add myapp.com --service frontend. Traffic starts routing immediately if the service is already live in that environment. - Configure DNS — Add a CNAME record pointing
myapp.comtoingress.hostess.run - DNS verification — Hostess checks DNS periodically, or run
hostess domains verify myapp.comto check immediately - TLS provisioning — Once DNS is verified, Hostess automatically requests a TLS certificate from Let's Encrypt
- Active — Domain is live with HTTPS. All traffic to
myapp.comroutes to your service.
Retarget the domain to a different service or environment at any point with hostess domains update — DNS verification carries over, so status doesn't reset to step 3.
Domain Status Values
| Status | Description |
|---|---|
Pending DNS | Domain added, waiting for DNS configuration |
DNS Verified | CNAME record detected, TLS certificate being provisioned |
DNS Failed | DNS verification failed — check your CNAME record |
Active | Domain is fully configured with HTTPS |
You can also configure domains declaratively in your hostess.yml:
services:
frontend:
type: nextjs
domains:
- myapp.com
- www.myapp.com
environments:
staging:
domains:
frontend: [staging.myapp.com]