| Type | Name | IPv4 address | Proxy status |
|---|---|---|---|
A | proxy-fallback | 192.0.2.1 | Proxied |
Before you start creating custom hostnames:
When you first enable Cloudflare for SaaS, you need to perform a few steps prior to creating any custom hostnames.
The fallback origin is where Cloudflare will route traffic sent to your custom hostnames (must be proxied).
To create your fallback origin:
A, AAAA, or CNAME record pointing to the IP address of your fallback origin (where Cloudflare will send custom hostname traffic).
| Type | Name | IPv4 address | Proxy status |
|---|---|---|---|
A | proxy-fallback | 192.0.2.1 | Proxied |
Using the hostname of the record you just created, update the fallback origin value.
CNAMEターゲット — オプションですが、強く推奨されます — は、顧客がトラフィックをルーティングするためのフレンドリーで柔軟な場所を提供します。customers.<SAAS_PROVIDER>.comのようなサブドメインを使用することをお勧めします。
作成したプロキシ付きのCNAMEが、あなたのCNAMEターゲットをフォールバックオリジンにポイントするようにします(*.customers.saasprovider.comのようなワイルドカードも可能です)。
| タイプ | 名前 | IPv4アドレス | プロキシステータス |
|---|---|---|---|
CNAME | .customers | proxy-fallback.saasprovider.com | プロキシ済み |
You need to perform the following steps for each custom hostname.
Before you create a hostname, you need to plan for:
You must complete both these steps for the hostname to work as expected.
After planning for certification and hostname validation, you can create the custom hostname.
To create a custom hostname:
app.customer.com and set the relevant options, including:
*.<custom-hostname> SAN to the custom hostname certificate. For more details, refer to Hostname priority.To create a custom hostname using the API, use the Create Custom Hostname endpoint.
certificate_authority parameter empty to set it to “default CA”. With this option, Cloudflare checks the CAA records before requesting the certificates, which helps ensure the certificates can be issued from the CA.For the newly created custom hostname, the POST response may not return the DCV validation token validation_records. It is recommended to make a second GET command (with a delay) to retrieve these details.
The response contains the complete definition of the new custom hostname.
カスタムホスト名の設定を完了するために、顧客は自分の権威DNSで、あなたのCNAMEターゲットを指すCNAMEレコードを設定する必要があります1。
顧客のCNAMEレコードは次のようになります:
www.mystore.com CNAME customers.saasprovider.comこのレコードは、次のようにトラフィックをルーティングします:
flowchart TD accTitle: CNAMEターゲットを使用したトラフィックルーティングの仕組み A[<code>www.mystore.com</code>へのリクエスト] --> B[<code>customers.saasprovider.com</code>] B --> C[<code>proxy-fallback.saasprovider.com</code>]
www.mystore.comへのリクエストは、あなたのCNAMEターゲット(customers.saasprovider.com)に行き、そこからフォールバックオリジン(proxy-fallback.saasprovider.com)にルーティングされます。
If your customer is also using Cloudflare for their domain, they should keep their DNS record pointing to your SaaS provider in place for as long as they want to use your service.
For more details, refer to Remove custom hostnames.
If you have regional services set up for your custom hostnames, Cloudflare always uses the processing region associated with your DNS target record (instead of the processing region of any custom origins).
↩