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.
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 successfully!
Configure your DNS:
Type: CNAME
Name: myapp.com
Value: ingress.hostess.run# 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-appDNS 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 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.# 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 - Configure DNS — Add a CNAME record pointing
myapp.comtoingress.hostess.run - DNS verification — Hostess periodically checks if the CNAME is configured correctly
- 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.
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]