Custom domains
Every stream server has a host such as acme-tv.live.hubfly.app. A custom domain lets viewers and encoders use your own name instead, such as live.acme.com. The stream server serves it directly, with its own TLS certificate.
Managing domains needs stream:admin.
Add a domain
Under Domains, add a hostname and choose what it is for:
| Purpose | Serves |
|---|---|
playback (default) | Players, embeds, thumbnails, status, listener streams and pulls |
ingest | Encoders: RTMP, RTMPS, SRT, WHIP and Icecast |
both | Both |
With the CLI or the API (POST …/stream/domains/create with {hostname, purpose}). The answer includes the CNAME target:
echo '{"hostname": "live.acme.com", "purpose": "both"}' | hubfly stream domains create acme-tv --file -
hubfly stream domains list acme-tvPoint DNS at the server
At your DNS provider, add a CNAME record from the hostname to the server's host:
| Type | Name | Target |
|---|---|---|
CNAME | live.acme.com | acme-tv.live.hubfly.app |
A CNAME cannot sit on a bare domain such as acme.com, so use a subdomain. If your DNS provider proxies traffic (for example an orange-cloud record), turn the proxy off for this record: encoders and players must reach the stream server directly.
Verify
Once the record is in place, choose Verify, or:
hubfly stream domains verify acme-tv sdm_dom00001Hubfly space checks that the hostname has a CNAME to the server's host. If it does not, the answer says what it found, for example a CNAME to another target or no record yet. DNS changes can take a while to spread; verify again later. With the API, call POST …/stream/domains/:domainId/verify.
Certificates
The stream server terminates TLS itself. After a domain verifies, the server obtains a certificate for it through an ACME HTTP-01 challenge on port 80, and renews it on its own. You do not upload certificates.
Keep the CNAME in place
Use the domain
Replace the server host with your domain in any URL its purpose covers:
https://live.acme.com/hls/sch_main0001/index.m3u8 playback
https://live.acme.com/embed/sch_main0001 embed page
https://live.acme.com/radio/sch_radio001.mp3 listeners
rtmps://live.acme.com:443/live ingest (stream key as usual)
srt://live.acme.com:9000?streamid=publish:hfls_cam1abcd_… ingest over SRTThe player element takes the domain as its host:
<hubfly-player host="live.acme.com" channel="sch_main0001" autoplay muted></hubfly-player>- A stream key works on every host of its own server, the server host and its verified ingest domains, and nowhere else.
- Playback tokens, allowed origins and viewer limits apply the same on every host. See playback security.
- The server host keeps working next to your domains.
Rules and limits
- Up to 10 custom domains per server.
- A lowercase DNS name you control. Names under
hubfly.app,hubfly.spaceorhubmail.spaceare refused (invalid_domain). - Only verified domains serve traffic.
- Remove a domain under Domains, or with
hubfly stream domains deleteorDELETE …/stream/domains/:domainId/delete. Players and encoders using it stop working; the server host is not affected.
See Webhooks and domains in the API reference.