Hostnames and DNS
Every container deployed on Bahriya gets one or more hostnames automatically. You don't need to configure DNS manually — Bahriya handles it.
Default hostname
When a container is deployed, it receives a default hostname scoped to the region it runs in:
{handle}.{region}.x.on.bahriya.app
For example, a container with handle my-api deployed to helsinki-1 gets:
my-api.helsinki-1.x.on.bahriya.app
If the container runs in multiple regions, each region gets its own default hostname. These are region-specific — traffic to a default hostname always goes to the container in that specific region.
Default hostnames are created automatically when the container is first deployed and are managed entirely by Bahriya. You cannot customise or remove them.
Vanity hostname
A vanity hostname sits above the regional default hostnames and routes traffic across multiple regions. The hostname depends on the DNS mode you choose:
{handle}.rr.on.bahriya.app (round-robin mode)
{handle}.geo.on.bahriya.app (geo mode)
See DNS Modes for details on each routing mode.
Custom domain
A custom domain lets you use your own domain name (e.g. api.yourcompany.com) rather than a bahriya.app subdomain. You provide the domain and Bahriya configures the DNS records required.
For custom domains you need to:
- Set the custom domain on your container.
- Add a CNAME record at your DNS provider pointing your domain to the Bahriya-provided target.
- TLS is provisioned automatically via Let's Encrypt once the CNAME is in place.
Custom domains support the same DNS modes as vanity hostnames.
TLS / HTTPS
All hostnames — default, vanity, and custom — are served over HTTPS. TLS certificates are provisioned automatically via Let's Encrypt and renewed before expiry. You do not need to manage certificates.
HTTP traffic is redirected to HTTPS.
DNS TTL
You can configure the DNS TTL (time to live) for your container's DNS records. A lower TTL means DNS changes (such as adding a region or enabling failover) propagate faster, at the cost of slightly higher DNS query volume.
Available values: 60s, 300s, 600s, 1800s, 3600s. The default is 300s (5 minutes).