---
title: "Verify domain ownership (checks CNAME)."
method: POST
path: "/custom-domains/{hostname}/verify"
tags: ["Custom domains"]
---

# Verify domain ownership (checks CNAME).

`POST /custom-domains/{hostname}/verify`

## Request

- Base URL: `https://api.stacktr.ee`
- URL: `https://api.stacktr.ee/custom-domains/{hostname}/verify`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.stacktr.ee/oauth/authorize`, token URL `https://api.stacktr.ee/oauth/token`, scopes: `sites:write`, `sites:read`)

## Response `200`

Verification result.

- CustomDomain
  - `hostname` string, required
  - `site_id` string, required
  - `status` 'pending' | 'verified' | 'failed', required
  - `cname_target` string: CNAME value the user must add to their DNS.
  - `verified_at` integer, nullable

---

[API](https://skmtc.dev/stacktr/apis/stacktree-api.md) · [All operations](https://skmtc.dev/stacktr/apis/stacktree-api/llms.txt) · [OpenAPI document](https://skmtc.dev/stacktr/apis/stacktree-api/revisions/5878cce46977?raw)
