> Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

---
title: "Add custom domain"
description: "Register a custom domain for a deployed project. Requires a Pro subscription. The domain must be CNAMEd to cname.holocron.so for SSL provisioning."
api: "POST /api/v0/domains"
gridGap: 30
---

<Aside full>
  <RequestExample>
    ```bash title="cURL" lines=false
    curl -X POST "https://api.example.com/api/v0/domains" \
      -H "Content-Type: application/json" \
      -d '{
      "projectId": "string",
      "hostname": "string"
    }'
    ```
  </RequestExample>
</Aside>

<OpenAPIEndpoint {...{"method":"post","path":"/api/v0/domains","summary":"Add custom domain","description":"Register a custom domain for a deployed project. Requires a Pro subscription. The domain must be CNAMEd to cname.holocron.so for SSL provisioning.","parameters":[],"requestBody":{"required":true,"contentType":"application/json","schema":{"type":"object","required":["projectId","hostname"],"properties":{"projectId":{"type":"string","description":"Project ULID.","minLength":1},"hostname":{"type":"string","description":"Custom domain hostname (e.g. docs.mycompany.com).","minLength":1,"maxLength":253}}},"examples":[]},"responses":[{"status":"200","description":"","schema":{"type":"object","required":["id","hostname","status","sslStatus","cnameTarget","createdAt"],"properties":{"id":{"type":"string"},"hostname":{"type":"string"},"status":{"type":"string"},"sslStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"cnameTarget":{"type":"string","description":"CNAME target for DNS configuration."},"createdAt":{"type":"number"}}},"examples":[]},{"status":"400","description":"","schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}},"examples":[]},{"status":"402","description":"","schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}},"examples":[]},{"status":"409","description":"","schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}},"examples":[]},{"status":"default","description":"","examples":[]}],"security":[],"servers":[]}} />
