WAF or CDN
A WAF or CDN in front of an endpoint forwards the public hostname as Host and checks the origin's certificate against that name. The endpoint therefore needs a certificate for the public name, which Alien issues and renews when you attach a custom domain with your own DNS.
browser ──► edge (Cloudflare or CloudFront) ──► generated hostname (origin)
app.customer-1.example Host: app.customer-1.exampleThe generated hostname stays in DNS as the origin address. This works for Containers and Daemons on AWS, Google Cloud, and Azure, and for Daemons with networkMode: "host" on Linux machines.
Custom domain
Note the generated hostname (<endpoint>.<deployment-domain>, shown in the dashboard) before you switch, because the deployment reports the custom name afterwards. Then register the name:
alien domains add app.customer-1.example --dns customerCreate the _acme-challenge CNAME it prints. Don't proxy it and don't flatten it: Alien checks for a plain CNAME. Once the domain shows verified, assign it to the endpoint:
alien deployments set-domains customer-1/us-east-1 --resource viewer \
--endpoint viewer=app.customer-1.exampleThe hostname's own record points at the edge, not at Alien.
If the zone has CAA records, they must allow the certificate authorities Alien uses. When a check fails, alien domains get <id> prints the record to add. Alien can issue from either authority and fails over between them, so allow both:
| Certificate authority | CAA identities to allow |
|---|---|
| ZeroSSL | sectigo.com, trust-provider.com, usertrust.com, comodoca.com, comodo.com, entrust.net, affirmtrust.com |
| Google Trust Services | pki.goog |
One identity of each is enough, for example 0 issue "sectigo.com" and 0 issue "pki.goog". If the zone has issuewild records, add the same identities there. Don't add parameters such as accounturi: Alien can't check them, so it treats that record as not allowing issuance. The only parameter it accepts is validationmethods=dns-01.
Edge settings
Add a proxied (orange cloud) CNAME for app.customer-1.example that targets the generated hostname.
Set SSL/TLS encryption mode to Full (strict). Never use Flexible: it sends traffic to the origin unencrypted.
Keep the _acme-challenge record DNS only and leave CNAME flattening off for it.
Cloudflare sends the original Host, so the origin presents the certificate for app.customer-1.example and Full (strict) accepts it.
On Linux machines, the generated hostname lists the machines' public IPs with a 30-second TTL. The edge stops sending traffic to a machine about a minute after it goes offline.
Origin access
After the switch, the generated hostname serves the custom certificate, so a TLS client that connects to it directly fails. It also still reaches the origin without passing the WAF. Locking the origin is the app's job: check a long, rotated secret header that the edge adds, strip it before use, and never log it.
Attaching or removing a custom domain restarts the resource once per replica or machine, so do it outside peak traffic.
Private keys
Each deployment holds the private key for its hostnames. Give each deployment its own names, for example *.c1.example.com, and never share a wildcard across deployments.
Next
- Networking and endpoints: the commands and supported platforms
- Machines: how machine endpoints serve HTTPS
- CLI reference: every
alien domainsoption