Skip to main content

Custom domains

API Gateway endpoints can be published on custom domain names (e.g., api.yourdomain.com). Custom domains include automated CNAME verification and TLS certificate management.

Setup workflow


Step 1: Claim custom domain in project

Register your custom domain with your project to retrieve your unique CNAME target.

platformctl gateway domain claim api.yourdomain.com

Output:

address: api.yourdomain.com
state: waiting for your DNS record

create this record with your DNS provider:
type: CNAME
name: api.yourdomain.com
value: cai-7f3q9k2mx8dw4h1v.gw.codyhill.dev

Step 2: Configure CNAME record at DNS provider

Add a CNAME record with your DNS hosting provider (e.g. Cloudflare, AWS Route53, GoDaddy):

Record TypeHost / NameTarget / ValueProxy Status
CNAMEapi (or api.yourdomain.com)cai-7f3q9k2mx8dw4h1v.gw.codyhill.devDNS Only (Unproxied)
Cloudflare Proxy Configuration

If using Cloudflare, ensure the proxy status is set to DNS Only (Grey Cloud). Proxied records block automated Let's Encrypt TLS validation challenges.


Step 3: Publish endpoint on custom domain

Once DNS verification completes, publish your endpoint directly on the custom domain.

platformctl gateway publish serverless/hello-world \
--name support-api --domain api.yourdomain.com

Domain Lifecycle States

  • pending_verification: Waiting for CNAME record propagation.
  • programming: CNAME verified; TLS certificate provisioning in progress (~30 seconds).
  • ready: Endpoint live over HTTPS on custom domain.
  • failed: Verification or certificate failure. Check technical details for resolution steps.