Skip to content

docs(compute): explain domain verification and Cloudflare proxying - #8581

Merged
sorenbs merged 3 commits into
codex/branch-custom-domainsfrom
feat/custom-domain-txt-verification
Oct 24, 2026
Merged

sorenbs merged 3 commits into
codex/branch-custom-domainsfrom
feat/custom-domain-txt-verification

Conversation

@sorenbs

@sorenbs sorenbs commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Purpose of change

Explain workspace TXT verification and how to connect a Cloudflare hostname, then enable proxying for its CDN.

What's changed and why

  • Show the TXT and CNAME setup, exact DNS names, Verify and connect, and CLI recovery.
  • Explain reuse after branch recreation, rejection by another workspace, and existing-domain behavior.
  • Explain Cloudflare's DNS-only requirement during connection and reattachment, then allow Proxied after Active. Cover Full (strict) TLS and certificate renewal through an accessible ACME challenge path.
  • Link to Cloudflare's proxy and TLS settings.
  • Correct the guide's deletion command and non-interactive confirmation flag.

Stacked on #8514. Companions: platform #5785 and CLI #370. Publish after its branch-domain rollout prerequisites and after the TXT platform change is deployed to both Console and Management API and the companion CLI is released. Do not publish these instructions before enforcement and recovery are available.

Testing notes / Before-after

Fumadocs MDX generation and the docs link check pass: 721 current files, zero errors. Only the Domains guide changes; generated REST and CLI references stay untouched.

Summary by CodeRabbit

  • Documentation
    • Clarified that new domain attachments require workspace TXT ownership verification before registration or certificate requests, followed by CNAME configuration for routing. Existing attached hostnames can be added again without re-verification.
    • Added guidance for verification errors, DNS propagation, and Cloudflare setup, including DNS-only mode during verification and retries. Explained that Prisma handles ACME validation.
    • Updated connection and removal instructions, including Console verification, CLI commands, and when workspace proof is needed again.

@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
blog Ready Ready Preview Oct 24, 2026 8:57am UTC
docs Ready Ready Preview Oct 24, 2026 8:57am UTC
eclipse Ready Ready Preview Oct 24, 2026 8:57am UTC
site Ready Ready Preview Oct 24, 2026 8:57am UTC
1 Skipped Deployment
Project Deployment Actions Updated
handbook Skipped Skipped Oct 24, 2026 8:57am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 2a690e33-1689-4bac-8bc7-55bf1a6e2469
Commits

Reviewing files that changed from the base of the PR and between a0f2b0d and 6d60c95.

Files selected for processing: 1
  • apps/docs/content/docs/compute/domains.mdx
Files skipped from review as they are similar to previous changes: 1
  • apps/docs/content/docs/compute/domains.mdx

Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

Walkthrough

The domain guide now documents workspace TXT ownership verification separately from CNAME routing. It also updates Cloudflare setup, provisioning, removal, and attachment requirements.

Changes

Workspace domain documentation

Layer / File(s) Summary
Ownership verification and DNS setup
apps/docs/content/docs/compute/domains.mdx
The guide describes workspace TXT proof for new attachments, CNAME routing, Console verification, and the error returned when ownership proof is missing.
Cloudflare setup and domain provisioning
apps/docs/content/docs/compute/domains.mdx
The guide describes Cloudflare DNS-only settings and ACME validation considerations. It requires both DNS records to propagate before connection.
Domain removal and attachment limits
apps/docs/content/docs/compute/domains.mdx
The guide updates the removal command and confirmation option. It explains reconnection proof requirements and states that new attachments require TXT proof alongside CNAME routing.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: amanvarshney01, wmadden-electric

Merge Risk: Minimal · up to 6d60c

No confirmed issue blocks merging the guide. Publish it only after the stated domain-verification and CLI rollout prerequisites are in place.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main documentation changes: domain verification and Cloudflare proxying.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@vercel
vercel Bot temporarily deployed to Preview – handbook October 23, 2026 10:08 Inactive
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🍈 Lychee Link Check Report

11 links: ✅ 3 OK | 🚫 0 errors | 🔀 0 redirects | 👻 8 excluded

✅ All links are working!


Full Statistics Table
Status Count
✅ Successful 3
🔀 Redirected 0
👻 Excluded 8
🚫 Errors 0
⛔ Unsupported 0
⏳ Timeouts 0
❓ Unknown 0

@vercel
vercel Bot temporarily deployed to Preview – handbook October 23, 2026 14:17 Inactive
@sorenbs sorenbs changed the title docs(compute): explain workspace TXT verification docs(compute): explain domain verification and Cloudflare proxying Oct 23, 2026
@sorenbs
sorenbs marked this pull request as ready for review October 24, 2026 07:57
@sorenbs
sorenbs merged commit 64c04e1 into codex/branch-custom-domains Oct 24, 2026
22 checks passed
@sorenbs
sorenbs deleted the feat/custom-domain-txt-verification branch October 24, 2026 09:24
sorenbs added a commit to prisma/prisma-cli that referenced this pull request Oct 24, 2026
## Purpose of change

Show TXT ownership instructions, Cloudflare proxy recovery, and a safe
retry command when a custom domain cannot connect.

## What's changed and why

- Recognize `domain-ownership-required` as
`SERVICE.DOMAIN_OWNERSHIP_REQUIRED`, with the exact DNS instructions
from the API.
- Keep the selected project, service, and shell-quoted branch in
**Verify and connect** recovery. Do not suggest deploying the service to
fix missing ownership proof.
- Recognize `domain-cloudflare-proxy` as
`SERVICE.DOMAIN_CLOUDFLARE_PROXY`. Explain DNS only during setup, then
Proxied after Active with Full (strict) TLS and an accessible ACME
challenge path. Preserve the same project, service, and branch when
retrying.
- Update command help and product/error docs. The CLI stays compatible
with the current API and needs no SDK change.

Stacked on #354 for branch-domain support. Companions: [platform
#5785](prisma/pdp-control-plane#5785) and [docs
#8581](prisma/web#8581). Merge and release that
PR first. Release this change before the platform TXT enforcement for
clear recovery guidance; publish the companion public docs only after
the platform deploy and CLI release.

<!-- cli-domain-verification-terminal-examples:start -->
## Terminal examples

Captured from this PR's head
(`231634ad916894ce495d57afaa24afc7ea11382f`) using the in-process CLI
harness and synthetic API responses. ANSI colors are removed. These are
actual CLI-rendered errors, not live DNS or certificate tests.
`workspace-proof` is a fixture value: use the exact TXT value provided
for your workspace.

### Missing workspace TXT proof

The CLI shows the API's exact TXT instructions. The recovery command
keeps the selected project, service, and shell-quoted branch; it does
not suggest deploying the app to fix missing proof.

```console
$ prisma service domain add staging.example.com --project acme-app --service hello-world --branch 'feature/domain fix'
✘ [SERVICE.DOMAIN_OWNERSHIP_REQUIRED] Verify ownership of staging.example.com
  why: DNS does not contain the TXT proof for this workspace.
→ Add a TXT record named _prisma-verification.staging.example.com with value prisma-verification=workspace-proof. Keep this record to reconnect domains in this workspace, then retry the same command.
→ Verify and connect: prisma service domain add staging.example.com --service svc_staging --project proj_1 --branch 'feature/domain fix'
```

Exit status: `2`. JSON mode reports `SERVICE.DOMAIN_OWNERSHIP_REQUIRED`
and the same **Verify and connect** next action.

### Cloudflare proxy recovery

Connect with **DNS only**, wait for **Active**, then restore **Proxied**
with **Full (strict)** TLS. The instructions also cover the ACME
challenge path for certificate renewal.

```console
$ prisma service domain add staging.example.com --project acme-app --service hello-world --branch 'feature/domain fix'
✘ [SERVICE.DOMAIN_CLOUDFLARE_PROXY] Turn off Cloudflare's proxy to connect staging.example.com
  why: Failed to add custom domain: This hostname appears to use Cloudflare's proxy. Set this record to DNS only (gray cloud). Once the domain is Active, turn Proxied back on with Full (strict) SSL/TLS and keep /.well-known/acme-challenge/* accessible.
→ Set this record to DNS only (gray cloud). Once the domain is Active, turn Proxied back on with Full (strict) SSL/TLS and keep /.well-known/acme-challenge/* accessible.
→ Verify and connect: prisma service domain add staging.example.com --service svc_staging --project proj_1 --branch 'feature/domain fix'
```

Exit status: `2`. JSON mode reports `SERVICE.DOMAIN_CLOUDFLARE_PROXY`.
Both captured recovery commands keep `--project proj_1`, `--service
svc_staging`, and `--branch 'feature/domain fix'`.
<!-- cli-domain-verification-terminal-examples:end -->

## Testing notes / Before-after

Before: the ownership error would be mistaken for a missing deployment.
After: the CLI shows the workspace TXT instructions or
Cloudflare-specific recovery and retries the same branch app.

Passed: root format, type checks (nine tasks), lint, error-reference
completeness (132 codes), full CLI package suite (1,050 passed, one
existing skip), and local end-to-end tests (seven passed). The 48 live
API tests skip without a service token. No live DNS or TLS changes were
made.

This branch was successfully deployed

4 active and 1 inactive deployments
Preview – docs — 6d60c954 Deployed Oct 24, 2026 by vercel[bot]
Preview – blog — 6d60c954 Deployed Oct 24, 2026 by vercel[bot]
Preview – site — 6d60c954 Deployed Oct 24, 2026 by vercel[bot]
Preview – eclipse — 6d60c954 Deployed Oct 24, 2026 by vercel[bot]
Preview – handbook — 6d60c954 Deployed Oct 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant