A custom domain serves your realtime traffic from a hostname you own, like realtime.yourcompany.com, instead of realtime.foony.io. Clients connect to your domain, certificates are issued and renewed for you, and everything else works exactly the same: WebSockets, the long-polling fallback, presence, history, and billing.
The main reason to use one is reachability. Some school and corporate networks filter by domain, and a filter that allows your product’s domain allows its subdomains too. Traffic to your own domain works even when third-party domains are blocked. It also keeps your product’s network traffic under your brand.
Custom domains are available on the Scale plan and up, with up to 5 per app.
Set up
In the dashboard, open your app’s Settings and find the Custom domain card. Type your hostname and select Add domain. The card then shows the one DNS record to create at your DNS provider:
Type Name Target
CNAME realtime.yourcompany.com realtime.foony.io
Once the record exists, validation and certificate issuance happen automatically, usually within a few minutes. The card polls live state, so you can watch it flip from Waiting for DNS to Active. Nothing else to configure.
If your DNS is hosted on Cloudflare, create the record with the proxy turned off (the gray cloud). A proxied record intercepts the traffic before it reaches the certificate that was issued for your hostname, and validation never completes.
Point your SDK at it
Set the endpoint option to your domain and everything else stays the same:
const realtime = new Realtime({
authCallback: fetchToken,
endpoint: 'realtime.yourcompany.com',
});
The Go SDK takes the same value in Options.Endpoint. Tokens, capabilities, and API keys are unchanged: authentication identifies your app, not the hostname, so the same credential works on your domain and on realtime.foony.io at the same time. You can roll clients over gradually.
Removing a domain
Remove the domain in the same card. Removal is immediate: clients still pointed at the hostname disconnect and cannot reconnect through it, so switch their endpoint back first. The DNS record at your provider is yours to delete afterward.
Limits and behavior
- Up to 5 custom domains per app, on the Scale plan and up.
- One hostname routes to exactly one app. The same hostname cannot be registered twice.
- Wildcard hostnames are not supported. Register each hostname you need.
- The certificate covers exactly your hostname and renews automatically. There is nothing to upload or rotate.