Custom domains allow serving Cerebrium apps through custom domains instead of the default *.cerebrium.ai URLs. Once configured, API calls will use the custom domain while keeping the same path structure: api.example.com/v4/p-1234/my-app/run.

Key Features

  • Support for apex domains (example.com) and subdomains (api.example.com)
  • Automatic SSL certificate provisioning and renewal
  • Project-level domains - one domain serves all apps in a project
  • Multiple domains can point to the same project
  • Professional branding with custom domains instead of *.cerebrium.ai URLs

How Custom Domains Work

  • Domains are region-specific meaning each will always resolve to the selected region
  • Domains are app-agnostic enabling connection to any number of deployed apps within a project via custom domain
  • Multiple domains can be configured on the same project (useful for apps within the project deployed in different regions)

Getting Started

Step 1: Create a Custom Domain

  1. Navigate to project settings in the Cerebrium dashboard
  2. Click on the “Custom Domains” tab
  3. Click “Add Custom Domain”
  4. Enter the domain name and select the target region (choose the region closest to users for optimal latency)
  5. Click “Create Domain”

Step 2: Configure DNS Records

After creating the domain, DNS configuration instructions will be displayed. Create a CNAME record at the DNS provider using the DNS record Cerebrium generates.
DNS record details can also be found later by clicking “DNS Record” in the Custom Domains list.
A {region} must be selected when creating a custom domain.

Step 3: Domain Validation

  1. After configuring DNS, return to the Cerebrium dashboard
  2. Cerebrium will automatically attempt to validate DNS records every 30 minutes for up to 2 days
  3. To trigger an immediate validation attempt, click “Validation Status” -> “Validate Domain” (you can do this manually even after the 2 days have elapsed)
  4. If validation fails, the dialog will show the last known error.
  5. Once validated, SSL certificates will be automatically provisioned

Step 4: Start Using the Custom Domain

Once validation is complete, the custom domain can be used immediately with all apps in the project:
curl -X POST https://api.example.com/v4/p-1234/my-app/run \
  -H "Authorization: Bearer {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d "{'inputs': {'prompt': 'Hello world'}}"

Managing Domains

Domain Validation Statuses

Cerebrium will attempt to validate domains once every 30 minutes up to a maximum of 2 days. If a domain is not being validated, click on “Validation Status” to see the last validation attempt, along with any error that occurred.
  • Pending: Domain is waiting for DNS validation
  • Validated: Domain is successfully validated and ready to use
  • Failed: DNS validation failed - click “Validation Status” to see the specific error

Validation Errors

If a domain shows “Failed” status, the DNS record has been misconfigured. Common issues include:
  • Wrong target: CNAME points to incorrect proxy URL
  • Multiple conflicting records: Remove any existing ALIAS records for the same hostname

Common DNS Provider Issues

  • Cloudflare: Disable proxy (set to “DNS only” - gray cloud icon)
  • Route53: Use simple routing policy, not weighted or latency-based
  • Namecheap: Use ”@” for apex domains, not “www” or blank
  • GoDaddy: CNAME records cannot be used with apex domains - consider using a subdomain or an ALIAS record

Common DNS Mistakes

  • Wrong proxy URL: Ensure the exact URL provided in the dashboard is being used
  • TTL too high: Consider lowering TTL before making DNS changes
  • Multiple records: Remove conflicting A or CNAME records for the same name

Security Considerations

  • Custom domains automatically receive SSL certificates
  • All traffic is encrypted end-to-end
  • Certificates auto-renew before expiration
  • Domain validation ensures control of the domain