Custom Domains
Serve a deployed website from your own domain (www.yoursite.com) instead of the run.hostfunc.io URL. hostfunc provisions and renews SSL automatically — you add a couple of DNS records and watch it go live.
Step-by-Step Guide
1.Deploy the website first
A custom domain attaches to a function that already serves a website. Deploy the function so it has a live version, then it becomes selectable as a domain target. See Websites for how a function serves HTML.
- Only deployed functions in your workspace appear in the domain target picker.
- One domain serves one website; add more domains to point at other websites.
2.Add your domain
In Workspace Settings → Domains, choose Add domain, enter the hostname you own, and pick which website it should serve. hostfunc registers the hostname and returns the exact DNS records to add.
- Enter a bare hostname —
www.example.com, nohttps://and no path. - A subdomain like
wwworappis the simplest to connect.
3.Add the DNS records at your registrar
Copy the CNAME (and any TXT validation records) into your registrar's DNS editor — Namecheap, GoDaddy, Cloudflare, etc. The Domains screen shows provider-specific hints next to each record.
- Subdomain: add a
CNAMEfrom your host (e.g.www) to the target shown (e.g.cname.hostfunc.app). - TXT records prove you control the domain so the SSL certificate can be issued.
- Root/apex domains can't use a CNAME — use your registrar's ALIAS/ANAME or CNAME-flattening to the same target, or point
wwwand add an apex redirect.
4.Wait for verification and SSL
The Domains screen polls automatically: it moves from “Add DNS records” to “Issuing SSL” to “Live”. DNS propagation and certificate issuance can take a few minutes (occasionally longer) — you can close the page and come back.
- “Add DNS records” — waiting for your records to be visible.
- “Issuing SSL” — records verified, certificate being provisioned.
- “Live” — your site is served at
https://yourdomainwith a valid certificate.
5.Receive email on your domain
Once a domain is live, the function's email trigger can use it: regenerate the inbound address on the function's Triggers page and it is issued on your domain (e.g. site-acme-x7q2w3e4@www.example.com). An Inbound email panel then appears on the Domains screen with the MX and TXT records to add.
- Add the MX/TXT rows exactly as shown (in Namecheap: Domain List → Manage → Advanced DNS). The MX record must have the lowest priority value on that name.
- The panel polls verification automatically; once it shows “Receiving”, mail to the generated address triggers your function.
- Inbound email DNS is separate from the website CNAME — removing one doesn't affect the other until the domain itself is removed.
6.Remove a domain
Removing a domain stops routing it, deletes the hostname from Cloudflare (and its inbound-email registration), and frees it so it can be claimed again. Your website keeps serving on its run.hostfunc.io URL.
7.Limits and validation
Guardrails that apply when adding domains.
- Up to 20 custom domains per workspace.
- Hostnames must be ASCII (
a-z, digits, hyphens); internationalized/punycode (xn--) names aren't supported yet. hostfunc.io,hostfunc.app, andhostfunc.devnames are reserved.