Custom Domains
Use your own domain with automatic SSL. Available on Always On eggs.
1. Add a custom domain
Attach a custom domain to any deployed egg:
hatch domain add example.comThe egg slug is auto-detected from .hatch.toml in the current directory, or pass --app <slug>.
This command outputs the DNS records you need to add.
2. Configure DNS records
Add these records at your DNS provider:
| Type | Name | Value |
|---|---|---|
| TXT | _hatch-verify | <verification-token> |
| CNAME | @ | <slug>.nest.gethatch.eu |
| CNAME | www | <slug>.nest.gethatch.eu |
The TXT record is required for domain ownership verification. The token is shown when you run hatch domain add.
For apex domains (no subdomain), some DNS providers require an ALIAS or ANAME record instead of CNAME.
3. Verify domain ownership
Once your DNS records are configured, verify the domain:
hatch domain verify example.comHatch checks the TXT record at _hatch-verify.example.com. If it matches your verification token, the domain is activated and routing begins.
DNS propagation can take up to 48 hours, but usually completes within minutes.
SSL auto-provisioning
SSL certificates are provisioned and renewed automatically via Let's Encrypt. Once your domain is verified and DNS records are configured, HTTPS is enabled within minutes. No manual certificate management required.
Manage domains
List and remove custom domains:
# List all domains for your egg
hatch domain list
# Check status of a specific domain
hatch domain list --app my-app
# Remove a domain
hatch domain remove example.com