Skip to content

Custom Domains

Learn how to set up custom domains for your brdz applications.

Custom domains allow you to serve your application from your own domain name instead of the default platform URL.

  • A deployed application
  • A domain name you own
  • Access to your domain’s DNS settings

First, ensure you have the correct app context:

Terminal window
# Verify context
brdz ctx:get
# Change context if needed
brdz ctx:use

Add your custom hostname:

Terminal window
brdz hostnames:create example.com

You can add multiple hostnames:

Terminal window
brdz hostnames:create example.com
brdz hostnames:create www.example.com

You need to point your domain to the brdz platform. The exact target will be provided when you add the hostname.

Use a CNAME record for subdomains like www.example.com:

Type: CNAME
Name: www
Value: your-app.brdz-platform.com
TTL: 300 (or automatic)

Use an A record for root domains like example.com:

Type: A
Name: @
Value: 192.0.2.1
TTL: 300 (or automatic)

If you’ve delegated your domain to brdz DNS, create records directly:

Terminal window
# Get your zone ID
brdz dns:zones:list
# Add CNAME for www
brdz dns:records:create www.example.com CNAME your-app.brdz-platform.com --zone <zone>
# Add A record for root
brdz dns:records:create example.com A 192.0.2.1 --zone <zone>

DNS changes can take time to propagate:

  • Typically: 5-30 minutes
  • Maximum: Up to 48 hours

Check propagation:

Terminal window
# Check DNS resolution
dig example.com
dig www.example.com
# Or use online tools
# whatsmydns.net
# dnschecker.org

SSL certificates are automatically provisioned:

  • Issued via Let’s Encrypt
  • Usually completes within 10 minutes
  • Automatic renewal before expiration

Check if your site is accessible via HTTPS:

Terminal window
curl -I https://example.com

Most sites should configure both:

Terminal window
brdz hostnames:create example.com
brdz hostnames:create www.example.com

DNS configuration:

example.com. A 192.0.2.1
www.example.com. CNAME example.com
Terminal window
# Main app
brdz ctx:use # Select web-app
brdz hostnames:create www.example.com
# API app
brdz ctx:use # Select api-app
brdz hostnames:create api.example.com
Terminal window
# Production
brdz ctx:use # Select production/web-app
brdz hostnames:create example.com
# Staging
brdz ctx:use # Select staging/web-app
brdz hostnames:create staging.example.com
# Development
brdz ctx:use # Select development/web-app
brdz hostnames:create dev.example.com
Terminal window
# Verify DNS points to correct target
dig example.com
dig www.example.com
# Check specific nameserver
dig @8.8.8.8 example.com
Terminal window
# Test HTTPS connection
curl -I https://example.com
# Check certificate details
openssl s_client -connect example.com:443 -servername example.com
  1. Open your domain in a browser
  2. Verify HTTPS is working (lock icon)
  3. Check certificate is valid
  4. Confirm your application loads

Problem: dig example.com doesn’t return expected IP

Solutions:

  1. Verify DNS records are correct at your registrar
  2. Wait for propagation (up to 48 hours)
  3. Clear local DNS cache:
    Terminal window
    # macOS
    sudo dscacheutil -flushcache
    # Linux
    sudo systemd-resolve --flush-caches
    # Windows
    ipconfig /flushdns

Problem: Certificate not issued or invalid

Solutions:

  1. Verify DNS is pointing correctly
  2. Wait up to 10 minutes for issuance
  3. Check no CAA records block Let’s Encrypt
  4. Ensure port 80 and 443 are accessible

Problem: Cannot add hostname

Solutions:

  1. Check if hostname is added to another app
  2. Remove from other app first:
    Terminal window
    brdz hostnames:list
    brdz hostnames:delete <hostname-id>
  3. Verify you own the domain

Problem: www and non-www don’t redirect properly

Solutions:

  1. Add both hostnames:
    Terminal window
    brdz hostnames:create example.com
    brdz hostnames:create www.example.com
  2. Both will serve the same application
  3. Implement redirects in your application if needed
Terminal window
brdz hostnames:create example.com
brdz hostnames:create www.example.com

Set DNS TTL to 300 seconds (5 minutes) while configuring, increase to 3600 (1 hour) once stable.

Test with a subdomain first:

Terminal window
brdz hostnames:create test.example.com

Keep notes about:

  • Which hostnames point to which apps
  • DNS provider and login details
  • When changes were made

After adding hostnames:

  • Check application logs
  • Monitor traffic and errors
  • Test from multiple locations

Migrating an existing domain to brdz:

Terminal window
# Deploy your app
brdz releases:create release.zip
# Add hostname but DON'T change DNS yet
brdz hostnames:create example.com

Test without changing DNS:

Terminal window
# Add to /etc/hosts (macOS/Linux)
192.0.2.1 example.com
# Test in browser
curl https://example.com

Remove the hosts entry when done testing.

At your current DNS provider, lower TTL to 300 seconds and wait for old TTL to expire.

Update DNS records to point to brdz platform.

Watch for:

  • DNS propagation
  • SSL certificate issuance
  • Application availability
  • Error logs
Terminal window
# Check from multiple locations
# Use online DNS checkers
# Test with different devices