Build & ship

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

Terminal
apprail domains add shop/web www.example.com
apprail domains shop/web
  1. Apprail prints the records to create at your DNS provider: a CNAME from your hostname to Apprail’s target, and the validation records the certificate authority needs.
  2. Create them. Apprail checks in the background; ownership and the certificate are separate steps and both are shown.
  3. 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

StateMeaning
pendingWaiting for your DNS records to resolve and the certificate to be issued
activeVerified, with HTTPS, and routed to your service
failedValidation didn’t succeed — check the records against what Apprail shows
deletingBeing 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

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.