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.

Updated 8 Jun 20262 min read

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 domains

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 issues the certificate and routes traffic.

You can attach up to 5 custom domains to a single container. The first is included; each additional custom domain is billed at $2.50 per month, metered per minute (60-second minimum, rounded up) — the same model as every other addon.

For each custom domain:

  1. Add the domain in the container's networking section (or via domains: in YAML / Reis).
  2. Add a CNAME record at your DNS provider pointing your domain to the Bahriya-provided target.
  3. TLS is provisioned automatically once the CNAME resolves. All custom domains for a container share a single multi-SAN certificate, so adding or removing a domain triggers a single renewal.

Custom domains support the same DNS modes as vanity hostnames.

www → apex redirect

For apex domains (e.g. example.com, not sub.example.com), you can opt in to a www.{domain} → {domain} redirect on a per-domain basis. When enabled, the redirect is provisioned automatically and the certificate covers both the apex and the www. variant. The toggle is only available for apex entries — sub-hostnames don't qualify.

TLS / HTTPS

All hostnames — default, vanity, and custom — are served over HTTPS. TLS certificates are provisioned automatically via the ACME protocol 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).