Map a custom domain
Every public web deployment on Ownkube gets an auto-allocated hostname under *.ownkube.app with automatic TLS. If you want to serve the same deployment from a hostname you own (api.acme.com, app.acme.com), add a CNAME record at your DNS provider that points at the auto-allocated hostname.
Before you start
Section titled “Before you start”- You need an active web deployment with Make this deployment public turned on. See Deployments.
- You need access to the DNS zone for the hostname you want to use (Cloudflare, Route53, Namecheap, etc.).
-
Copy the auto-allocated hostname
Open your deployment from your dashboard. On the Overview tab, find the public URL. It looks like
https://your-app-production-a1b2c3.ownkube.app. Copy the hostname (everything afterhttps://, no trailing slash). -
Create a CNAME record
At your DNS provider, add a record for the hostname you want to expose:
Field Value Type CNAMEName / Host the subdomain you want (e.g. api)Target / Value the auto-allocated hostname from step 1 TTL 300(5 minutes) is a reasonable defaultProxy / Cloud icon on if you’re using Cloudflare and want it to terminate TLS, otherwise off Apex domains (
acme.comwith no subdomain) cannot use a CNAME at most providers. Use a subdomain likewww.acme.comorapp.acme.com, or use your provider’sALIAS/ANAMErecord type if it supports one. -
Wait for DNS to propagate
Most providers update within a minute or two. You can check with
digornslookup:Terminal window dig +short api.acme.com CNAMEThe output should show the auto-allocated
*.ownkube.apphostname. -
Terminate TLS at your edge
Because Ownkube does not yet issue certificates for custom hostnames, point a TLS-terminating proxy at the auto-allocated hostname:
- Cloudflare: turn the orange-cloud proxy on for the CNAME record. Cloudflare issues a certificate for
api.acme.comand forwards traffic to Ownkube over HTTPS. - Your own load balancer: attach a certificate for
api.acme.comand configure the origin as the auto-allocated*.ownkube.apphostname over HTTPS.
Traffic between your edge and Ownkube is always served over HTTPS using the cert Ownkube manages on the
*.ownkube.apphostname. - Cloudflare: turn the orange-cloud proxy on for the CNAME record. Cloudflare issues a certificate for
-
Verify
Open
https://api.acme.comin a browser. You should see your app, served over TLS via your edge.
What Ownkube sees
Section titled “What Ownkube sees”Requests still arrive at the auto-allocated *.ownkube.app hostname (your edge proxies to it), so the Host header your container receives is the *.ownkube.app hostname. If your app reads Host to build absolute URLs, configure your edge to forward the original host header (X-Forwarded-Host) and have your app prefer that.
Limits and constraints
Section titled “Limits and constraints”- One custom hostname per deployment is the supported pattern today. Add multiple CNAMEs at your DNS provider if you need more, all pointing at the same auto-allocated hostname.
- No apex domain support without an
ALIASorANAMErecord from your DNS provider. Subdomains work everywhere. - No managed TLS for custom hostnames yet. Terminate at your edge.
- No HTTP to HTTPS redirect on the custom hostname unless your edge does it. Ownkube redirects on the auto-allocated hostname.
Roadmap
Section titled “Roadmap”- Managed TLS on customer hostnames. Ownkube will issue and rotate certificates for hostnames you’ve mapped, so you won’t need a TLS-terminating edge.
- Apex domain support via DNS challenge once managed TLS ships.