In Cloudflare for SaaS, how does a customer's own domain such as shop.customer.com reach your fallback origin with a valid edge certificate?
answer
- one proxied record catches all
- the customer adds a CNAME
- two separate validations
- status and ssl.status
basics
~20 sYou designate a proxied record as the fallback origin, create a custom hostname for shop.customer.com, and the customer CNAMEs it to your target. Cloudflare validates hostname ownership (status) and gets the certificate through DCV (ssl.status); both must read active.
solid answer
~40 sCloudflare for SaaS lets your zone serve hostnames you do not own. Once per zone, create a proxied `A`, `AAAA` or `CNAME` record such as `proxy-fallback.saasprovider.com`, designate it as the **fallback origin**, and optionally add a proxied CNAME target like `customers.saasprovider.com` pointing at it. Per customer, create a **custom hostname**, and the customer adds `shop.customer.com CNAME customers.saasprovider.com`. Two validations follow: **hostname validation** proves ownership, through the `_cf-custom-hostname` TXT record, an HTTP token, or in real time on the CNAME, and sets `status`; **certificate DCV** (`ssl.method` of `http`, `txt` or `email`) lets the CA issue an ECDSA and an RSA certificate and sets `ssl.status`. Go live only when both are `active` and DNS points at your target. Free, Pro and Business include 100 custom hostnames and, since May 2025, allow up to 50,000.
code
json · 10 lines{
"hostname": "shop.customer.com",
"ssl": {
"method": "txt",
"type": "dv",
"settings": {
"min_tls_version": "1.2"
}
}
}go deeper
Recall the pieces: a fallback origin, an optional CNAME target, a custom hostname per customer, and the CNAME the customer adds at their DNS.
Explain the two validations and their status fields, and which settings a custom hostname can override: origin server, minimum TLS version, validation method.
Know the plan boundaries before promising customers anything: wildcard hostnames, chosen CAs, custom certificates and apex proxying are Enterprise, and hostname priority decides contested names.
Design onboarding around the customer's tolerance for downtime and DNS effort, and decide whether to offer apex domains or wildcards at all, given their plan cost.
## What Cloudflare for SaaS solves A SaaS product often lets customers serve it from their own domain, such as `shop.customer.com`. **Cloudflare for SaaS** lets the provider's zone (the SaaS zone) proxy those **custom hostnames**: Cloudflare validates each one, issues an edge certificate for it, and routes its traffic through the SaaS zone's settings to the provider's origin. The customer keeps their own DNS provider and only adds a record pointing at the provider. ## One-time zone setup 1. Enable Cloudflare for SaaS on the zone. 2. Create a **proxied** `A`, `AAAA` or `CNAME` record for the origin, for example `proxy-fallback.saasprovider.com`. 3. On the **Custom Hostnames** page, enter that hostname as the **Fallback Origin** and wait until it shows **Active**. Active only means Cloudflare is ready to send traffic to that record; the record itself must still point at the right server. 4. Optionally, and recommended, create a proxied CNAME target such as `customers.saasprovider.com` that points at the fallback origin, so customers have a stable name to target. ## Per-customer flow 1. Create the custom hostname `shop.customer.com` in the dashboard or through the API, choosing the certificate validation method. Never create one that equals the SaaS zone's own name. 2. The customer adds `shop.customer.com CNAME customers.saasprovider.com` at their authoritative DNS. 3. Cloudflare completes two separate validations, below. 4. Requests to `shop.customer.com` reach the fallback origin; by default the original custom hostname travels as the `Host` header. ## Two validations, two status fields | | Hostname validation | Certificate validation (DCV) | |---|---|---| | Proves | the customer controls the name | to the CA that the name may get a certificate | | Tokens | `ownership_verification` (a TXT record at `_cf-custom-hostname.<hostname>`) or `ownership_verification_http` | `ssl.validation_records` | | Methods | pre-validation by TXT or HTTP token, or real-time when the CNAME appears | `ssl.method`: `http`, `txt` or `email` | | Status field | `status` | `ssl.status` | A hostname is ready for production only when `status` is `active`, `ssl.status` is `active`, and its DNS points at the SaaS target. A TLS handshake can succeed earlier when another matching certificate exists, so the custom hostname details from the API are the source of truth. Unless custom certificates are uploaded, each hostname gets two certificates: an ECDSA P-256 certificate, and an RSA 2048-bit fallback for clients without elliptic-curve support. ## Checking readiness from the API Onboarding code usually polls the custom hostname details endpoint rather than the dashboard: 1. Read the custom hostname with a `GET`; the `POST` that created it may not include `ssl.validation_records` yet, because Cloudflare fetches DCV tokens from the CA asynchronously. 2. While `status` is `pending`, `verification_errors` says why, for example that the custom hostname does not CNAME to this zone. 3. While `ssl.status` is `pending_validation`, `ssl.validation_errors` carries the CA's message, such as a CAA or DNS lookup problem on the customer's side. 4. Mark the customer live only when both statuses are `active`. ## Options and plan boundaries - **Custom origin server**: per hostname, `custom_origin_server` sends traffic to another origin. It must be a hostname with a proxied record in the provider's zone, not an IP address, and not a wildcard. - **Minimum TLS Version**: a custom hostname created without its own `min_tls_version` inherits the zone's value. - **Free, Pro and Business**: 100 custom hostnames included, up to 50,000, at $0.10 per additional hostname; custom origin server is included. - **Enterprise only**: choosing the CA with `certificate_authority`, uploading custom certificates, and wildcard custom hostnames. **Apex proxying**, for customers who must point an `A` record at the provider, is an Enterprise paid add-on; by default an `A` record to the target is not supported. - **Another CDN in front**: hostnames whose DNS another CDN obscures cannot pass hostname validation. ## Who controls a contested hostname When a customer also has the same name proxied in their own Cloudflare zone, an **exact** custom hostname in the SaaS zone, once verified, takes priority over their DNS record, so traffic follows the provider's zone settings; to take the name back, the customer asks the provider to delete the custom hostname and repoints the record. A **wildcard** custom hostname ranks below the customer's own proxied record, so an exact hostname is the safer default.
- How do you send one customer's traffic to a different origin than the fallback origin?Set `custom_origin_server` on that custom hostname, in the dashboard or the API. The value must be a hostname with a proxied A, AAAA or CNAME record in your zone, not an IP address and not a wildcard. Other custom hostnames keep using the fallback origin.
- Why can't a customer simply point their apex domain customer.com at your target with an A record?By default Cloudflare for SaaS expects a CNAME to your target, an A record to it is not a supported setup, and most DNS providers allow no CNAME at a zone's root. Apex proxying, an Enterprise paid add-on, assigns static IP prefixes to your account (or uses your own through BYOIP) so customers can create a standard A record.
- The fallback origin can be a DNS-only record pointing at your server.
- Once a custom hostname's status is active, its certificate is ready too.
- A Free-plan SaaS zone can choose the certificate authority per custom hostname.
- Customers must move their DNS to Cloudflare before they can use your custom hostnames.
- A custom hostname's minimum TLS version is fixed at 1.2 whatever the zone says.
Assumes Cloudflare for SaaS as of 2026-10-10: since May 2025 non-Enterprise SaaS zones allow up to 50,000 custom hostnames (previously 5,000) and custom origin server, which was Enterprise-only before.