Domains & HTTPS
Every web service has an HTTPS address from the start. Bring your own domain with one DNS record — no nameserver changes and no Cloudflare account needed.
Generated addresses
Each web service gets an address on apprail.io in every environment it runs in, with HTTPS already working. apprail status shop/web shows them. Workers have no address.
Add your domain
apprail domains add shop/web www.example.com
apprail domains shop/web- Apprail prints the records to create at your DNS provider: a
CNAMEfrom your hostname to Apprail’s target, and the validation records the certificate authority needs. - Create them. Apprail checks in the background; ownership and the certificate are separate steps and both are shown.
- When both are active, Apprail starts routing the hostname to your service. Until then, nothing points at it.
Domains belong to one service and one environment (production unless you pass --env). Remove one with apprail domains delete shop/web www.example.com; a service that still has domains can’t be deleted.
Domain states
| State | Meaning |
|---|---|
pending | Waiting for your DNS records to resolve and the certificate to be issued |
active | Verified, with HTTPS, and routed to your service |
failed | Validation didn’t succeed — check the records against what Apprail shows |
deleting | Being removed from the edge, then from routing |
Apprail keeps checking active domains. If the edge ever reports a hostname or certificate as no longer valid, that hostname is withdrawn from routing and restored automatically once it recovers.
Rules
- One workspace per hostname. A hostname connected in one workspace can’t be added in another; the answer never says whose it is.
- Abandoned claims expire. A domain that is still pending or failed after 24 hours is released if another workspace asks for it, so nobody can squat a hostname they don’t control. A verified domain is never released.
- Subdomains. Use a hostname like
www.example.comorapp.example.com. Root domains (example.com) need a DNS provider that supports CNAME flattening or ALIAS records. Wildcards aren’t supported. - Previews use generated addresses only.
Caching at the edge
Traffic reaches Apprail through Cloudflare’s edge. Always tell it what may be cached: send Cache-Control: no-store or private on anything personal, and a long max-age on files that never change. Without a header, the edge may still cache URLs that look like static files (.js, .css, images) for a few hours. Static sites built by Apprail send the right headers already.
If adding domains is temporarily unavailable, Apprail says so (domains_unavailable) rather than creating domains that could never validate. Try again later; existing domains keep working.