Hostnames
Hostnames allow you to serve your application from custom domains instead of default platform domains.
Overview
Section titled “Overview”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
Creating a Hostname
Section titled “Creating a Hostname”Add a custom hostname to your current app:
brdz hostnames:create example.comRequirements:
- App context must be set
- You must own the domain
- Domain must be valid (RFC compliant)
Examples
Section titled “Examples”# Add root domainbrdz hostnames:create example.com
# Add subdomainbrdz hostnames:create www.example.com
# Add API subdomainbrdz hostnames:create api.example.com
# Add environment-specific subdomainbrdz hostnames:create staging.example.comListing Hostnames
Section titled “Listing Hostnames”View all hostnames for your current app:
brdz hostnames:listOutput example:
ID Hostname Created At1 example.com 2025-01-18 10:30:002 www.example.com 2025-01-18 10:31:003 api.example.com 2025-01-18 14:20:00DNS Configuration
Section titled “DNS Configuration”After adding a hostname, you need to configure DNS to point to your application.
Using CNAME Records
Section titled “Using CNAME Records”For subdomains (recommended):
www.example.com. IN CNAME your-app.brdz-platform.com.Using A Records
Section titled “Using A Records”For root domains:
example.com. IN A 192.0.2.1Using brdz DNS Management
Section titled “Using brdz DNS Management”If your domain is managed through brdz DNS zones:
# Create a CNAME recordbrdz dns:records:create www.example.com CNAME your-app.brdz-platform.com --zone <zone>
# Or create an A recordbrdz dns:records:create example.com A 192.0.2.1 --zone <zone>See DNS Management Guide for details.
SSL/TLS Certificates
Section titled “SSL/TLS Certificates”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
Multiple Hostnames
Section titled “Multiple Hostnames”You can add multiple hostnames to a single app:
# Add root domainbrdz hostnames:create example.com
# Add www subdomainbrdz hostnames:create www.example.com
# Add regional subdomainbrdz hostnames:create eu.example.comAll hostnames serve the same application and current release.
Hostname Best Practices
Section titled “Hostname Best Practices”- Use www subdomain - Add both root and www for flexibility
- Verify DNS propagation - Check DNS before adding hostname
- Wait for SSL - Allow time for certificate issuance
- Use CNAME for subdomains - Easier to manage than A records
- Document hostnames - Keep track of which apps use which domains
Common Patterns
Section titled “Common Patterns”Root and WWW
Section titled “Root and WWW”brdz hostnames:create example.combrdz hostnames:create www.example.comMultiple Environments
Section titled “Multiple Environments”# Production appbrdz ctx:use # Select production appbrdz hostnames:create example.com
# Staging appbrdz ctx:use # Select staging appbrdz hostnames:create staging.example.comMultiple Services
Section titled “Multiple Services”# Frontend appbrdz ctx:use # Select frontend appbrdz hostnames:create www.example.com
# API appbrdz ctx:use # Select api appbrdz hostnames:create api.example.com
# Docs appbrdz ctx:use # Select docs appbrdz hostnames:create docs.example.comTroubleshooting
Section titled “Troubleshooting”DNS Not Resolving
Section titled “DNS Not Resolving”If your hostname isn’t resolving:
- Check DNS configuration:
dig example.com - Wait for DNS propagation (up to 48 hours)
- Verify DNS records are correct
- Check for typos in CNAME/A records
SSL Certificate Issues
Section titled “SSL Certificate Issues”If SSL certificate isn’t issued:
- Verify DNS is pointing to the correct target
- Wait up to 10 minutes for issuance
- Check domain validation is accessible
- Ensure no CAA records block Let’s Encrypt
Hostname Already Taken
Section titled “Hostname Already Taken”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
Commands Reference
Section titled “Commands Reference”hostnames:create <hostname>
Section titled “hostnames:create <hostname>”Add a custom hostname to the current app.
Requirements:
- App context must be set
Arguments:
hostname- Domain or subdomain (required)
Example:
brdz hostnames:create example.comhostnames:list
Section titled “hostnames:list”List all hostnames for the current app.
Requirements:
- App context must be set
Example:
brdz hostnames:listRelated Topics
Section titled “Related Topics”- Apps - Managing apps that have hostnames
- DNS Zones - Managing DNS zones
- DNS Records - Creating DNS records
- Core Concepts: Hostnames - Understanding hostname architecture