Custom domains for hosted sites
Hosted sites can serve at any domain you own. The setup is one DNS record on your side, and Turtini handles TLS via Cloud Run's managed certificate.
DNS record (you add this to your domain registrar / Cloudflare):
Type: CNAME
Name: @ (or the subdomain you want — e.g. www, app, marketing)
Target: hosted.turtini.com
Proxy: DNS only (grey cloud, if you're on Cloudflare) — Google's managed cert won't validate through Cloudflare's HTTPS proxy
That's the entire DNS side.
In Turtini:
1. Open Builder → Sites → your hosted site
2. Open the host config (Disconnect / Custom domain panel)
3. Enter your domain (the bare hostname, e.g. acme.com or marketing.acme.com)
4. Click Save
Turtini stores the customDomain on the hostedSite doc. Within ~5 seconds, requests to that hostname start serving your hosted-site files via Cloud Run + (optionally) Cloudflare's edge.
How a request flows:
browser → DNS → hosted.turtini.com → Cloud Run (serveHostedFile)
→ resolves Host header → site's GCS prefix
→ returns bytes with Cache-Control: public, max-age=300
If you want CDN-grade edge caching across many regions, you can put your own Cloudflare in front (orange cloud) and have Cloudflare proxy to hosted.turtini.com. Turtini's serveHostedFile sees the original Host via the X-Turtini-Host header that Cloudflare's proxy preserves, so multi-tenant routing still works.
Apex domains: if you're connecting an apex (acme.com vs www.acme.com), use Cloudflare's CNAME flattening or your registrar's ALIAS / ANAME record type. Pure A records to hosted.turtini.com are not supported because Cloud Run's IP can change; CNAME-shaped records are required.
Cert provisioning: takes 10-15 minutes after the DNS record propagates. During that window you'll see a TLS cert error — wait it out. The cert auto-renews thereafter; you don't manage it.
Multiple domains per site: not supported in V1. One customDomain per hostedSite. Workaround: register additional domains as separate hosted sites pointing at the same repo + branch.
Removing a custom domain: clear the customDomain field on the hostedSite. Within 60 seconds the host cache invalidates and requests to that hostname start returning 404. Remove the DNS record on your side at the same time.