Skip to content

Hostnames

Hostnames allow you to serve your application from custom domains instead of default platform domains.

A hostname is:

  • A custom domain or subdomain (e.g., example.com, www.example.com)
  • Associated with a specific app
  • Used to serve your application’s current release
  • Configurable through DNS

Add a custom hostname to your current app:

Terminal window
brdz hostnames:create example.com

Requirements:

  • App context must be set
  • You must own the domain
  • Domain must be valid (RFC compliant)
Terminal window
# Add root domain
brdz hostnames:create example.com
# Add subdomain
brdz hostnames:create www.example.com
# Add API subdomain
brdz hostnames:create api.example.com
# Add environment-specific subdomain
brdz hostnames:create staging.example.com

View all hostnames for your current app:

Terminal window
brdz hostnames:list

Output example:

ID Hostname Created At
1 example.com 2025-01-18 10:30:00
2 www.example.com 2025-01-18 10:31:00
3 api.example.com 2025-01-18 14:20:00

After adding a hostname, you need to configure DNS to point to your application.

For subdomains (recommended):

www.example.com. IN CNAME your-app.brdz-platform.com.

For root domains:

example.com. IN A 192.0.2.1

If your domain is managed through brdz DNS zones:

Terminal window
# Create a CNAME record
brdz dns:records:create www.example.com CNAME your-app.brdz-platform.com --zone <zone>
# Or create an A record
brdz dns:records:create example.com A 192.0.2.1 --zone <zone>

See DNS Management Guide for details.

SSL certificates are automatically provisioned for custom hostnames:

  • Certificates are issued via Let’s Encrypt
  • Automatic renewal before expiration
  • HTTPS is enforced by default
  • Certificate issuance may take a few minutes

You can add multiple hostnames to a single app:

Terminal window
# Add root domain
brdz hostnames:create example.com
# Add www subdomain
brdz hostnames:create www.example.com
# Add regional subdomain
brdz hostnames:create eu.example.com

All hostnames serve the same application and current release.

  1. Use www subdomain - Add both root and www for flexibility
  2. Verify DNS propagation - Check DNS before adding hostname
  3. Wait for SSL - Allow time for certificate issuance
  4. Use CNAME for subdomains - Easier to manage than A records
  5. Document hostnames - Keep track of which apps use which domains
Terminal window
brdz hostnames:create example.com
brdz hostnames:create www.example.com
Terminal window
# Production app
brdz ctx:use # Select production app
brdz hostnames:create example.com
# Staging app
brdz ctx:use # Select staging app
brdz hostnames:create staging.example.com
Terminal window
# Frontend app
brdz ctx:use # Select frontend app
brdz hostnames:create www.example.com
# API app
brdz ctx:use # Select api app
brdz hostnames:create api.example.com
# Docs app
brdz ctx:use # Select docs app
brdz hostnames:create docs.example.com

If your hostname isn’t resolving:

  1. Check DNS configuration: dig example.com
  2. Wait for DNS propagation (up to 48 hours)
  3. Verify DNS records are correct
  4. Check for typos in CNAME/A records

If SSL certificate isn’t issued:

  1. Verify DNS is pointing to the correct target
  2. Wait up to 10 minutes for issuance
  3. Check domain validation is accessible
  4. Ensure no CAA records block Let’s Encrypt

If you can’t add a hostname:

  • Check if it’s already added to another app
  • Verify you own the domain
  • Ensure the hostname format is valid

Add a custom hostname to the current app.

Requirements:

  • App context must be set

Arguments:

  • hostname - Domain or subdomain (required)

Example:

Terminal window
brdz hostnames:create example.com

List all hostnames for the current app.

Requirements:

  • App context must be set

Example:

Terminal window
brdz hostnames:list