TXT
TXT record validation requires the creation of a TXT record in the hostname’s authoritative DNS.
一般的に、HTTP 検証や委任 DCVを使用できない場合は、TXT ベースの DCV を使用するべきです。
カスタムホスト名にワイルドカードが含まれていない場合、Cloudflare は常に自動的に HTTP 検証を通じて DCV を完了しようとします。たとえ検証方法として TXT を選択していてもです。
この HTTP 検証は、顧客がカスタムホスト名を指しており、選択した証明書機関をブロックする CAA レコード がない限り成功するはずです。
To validate a certificate on a wildcard custom hostname, you should either set up Delegated DCV or TXT-based DCV.
Cloudflare recommends Delegated DCV as it is much simpler for you and your customers.
If you choose TXT-based DCV, Cloudflare requires two TXT DCV tokens - one for the apex and one for the wildcard - to be placed at your customer’s authoritative DNS provider in order for the wildcard certificate to issue or renew.
These two tokens are required because Let’s Encrypt and Google Trust Services follow the ACME Protocol ↗, which requires one DCV token to be placed for every hostname on the certificate.
これは、ワイルドカードのカスタムホスト名を使用することを選択した場合、これらの DCV トークンを顧客と共有する方法が必要になることを意味します。
新しいホスト名を 作成し、この検証方法を選択すると、トークンは数秒後に準備が整います。
These tokens can be fetched through the API or the dashboard when the certificates are in a pending validation state during custom hostname creation or during certificate renewals.
You can access these tokens using the API with the GET custom hostnames endpoint.
For example, here are two tokens highlighted in the API response for a wildcard custom hostname.
{ "result": [ { "id": "<HOSTNAME_ID>", "hostname": "<HOSTNAME>", "ssl": { "id": "<CERTIFICATE_ID>", "type": "dv", "method": "txt", "status": "pending_validation", "validation_records": [ { "status": "pending", "txt_name": "_acme-challenge.<HOSTNAME>", "txt_value": "gESljTB8fBT1mIuoEASU0qcK-oTd46baarnU_ZGjJIY" }, { "status": "pending", "txt_name": "_acme-challenge.<HOSTNAME>", "txt_value": "Pd8ViwX8KuA78kLbQHGmdEh4tQSpHBRxiNuJOYStEC0" } ], "settings": { "min_tls_version": "1.0" }, "bundle_method": "ubiquitous", "wildcard": true, "certificate_authority": "google" }, "status": "pending", "ownership_verification": { "type": "txt", "name": "_cf-custom-hostname.<HOSTNAME>", "value": "ac4a9a9d-5469-44cb-9d76-cea7541c9ff8" }, "ownership_verification_http": { "http_url": "http://<HOSTNAME>/.well-known/cf-custom-hostname-challenge/fabdf93c-a4ce-4075-9f3f-c553a5f93bed", "http_body": "ac4a9a9d-5469-44cb-9d76-cea7541c9ff8" }, "created_at": "2022-10-06T19:35:33.143257Z" } ]}- Log in to the Cloudflare dashboard ↗ and select your account.
- Select your Cloudflare for SaaS application.
- Navigate to SSL/TLS > Custom Hostnames.
- Select a hostname.
- Copy the values for Certificate validation TXT name and Certificate validation TXT value.
If you had previously created a wildcard custom hostname, you would need to copy the values for two different validation TXT records.
次に、これらの TXT トークンを顧客と共有する必要があります。
Your customers should place these at their authoritative DNS provider under the "_acme-challenge" DNS label. Once these TXT records are in place, validation and certificate issuance will automatically complete.
If you would like to request an immediate recheck, rather than wait for the next retry, send a PATCH request with the same values as your initial POST request.
DCV トークンは、証明書機関に応じて 一定の時間の後に期限切れになります。
これは、顧客が権威のある DNS プロバイダーにトークンを配置するのに時間がかかりすぎると、新しいトークンを 取得する必要があることを意味し、再度顧客と共有する必要があります。
DigiCert を証明書機関としてホスト名を作成する場合、顧客が権威のある DNS プロバイダーに配置するために共有する必要があるのは 1 つの TXT レコードだけです。
ただし、Cloudflare は まもなく ↗ カスタムホスト名の発行 CA として DigiCert を非推奨にする予定ですので、カスタムホスト名を別の CA に移行するために、移行ガイドに従うことをお勧めします。