TLS Management
Last updated Oct 15, 2026 adds an extra layer of protection to application connections by validating certificates on the server and the client. When building a SaaS application, you may want to enforce mTLS to protect sensitive endpoints related to payment processing, database updates, and more.
Minimum TLS Version only allows HTTPS connections from visitors that support the selected TLS protocol version or newer. Cloudflare recommends TLS 1.2 to comply with the Payment Card Industry (PCI) Security Standards Council. As a SaaS provider, you can control the Minimum TLS version for your zone as a whole, as well as for individual custom hostnames.
Cipher suites are a combination of ciphers used to negotiate security settings during the SSL/TLS handshake ↗︎. As a SaaS provider, you can specify configurations for cipher suites on your zone as a whole and cipher suites on individual custom hostnames via the API.
Caution
When you issue a custom hostname certificate with wildcards enabled, any cipher suites or Minimum TLS settings applied to that hostname will only apply to the direct hostname.
However, if you want to update the Minimum TLS settings for all wildcard hostnames, you can change Minimum TLS version at the zone level.
Enable mTLS
Once you have added a custom hostname, you can enable mTLS by using Cloudflare Access. In the Cloudflare dashboard ↗︎, go to Zero Trust and add mTLS authentication with a few clicks.
Note
Currently, you cannot add mTLS policies for custom hostnames using API Shield.
Also make sure to enforce mTLS on the specific custom hostname where it should be checked. It is not enough to have it set on the CNAME target.
Minimum TLS Version
Note
While TLS 1.3 is the most recent and secure version, it is not supported by some older devices. Refer to Cloudflare's recommendations when deciding what version to use.
Scope
Minimum TLS version exists both as a zone-level setting (on the Edge Certificates ↗︎ page under Minimum TLS Version) and as a custom hostname setting. What this implies is:
- For custom hostnames created via API, it is possible not to explicitly define a value for
min_tls_version. When that is the case, whatever value is defined as your zone's minimum TLS version will be applied. To confirm whether a given custom hostname has a specific minimum TLS version set, use the following API call.
<details>
<summary>
Check custom hostname TLS settings
</summary>
<details>
<summary>
Required API token permissions
</summary>
At least one of the following <a href="https://developers.cloudflare.com/fundamentals/api/reference/permissions/">token permissions</a> is required:
- <code>SSL and Certificates Write</code>
- <code>SSL and Certificates Read</code>
</details>
Custom Hostname Detailsbash
curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/custom_hostnames/$CUSTOM_HOSTNAME_ID" \
--request GET \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
Response examplejson
"success": true,
"result": {
"id": "<CUSTOM_HOSTNAME_ID>",
"ssl": {
"id": "<CERTIFICATE_ID>",
"bundle_method": "ubiquitous",
"certificate_authority": "<CERTIFICATE_AUTHORITY>",
"custom_certificate": "",
"custom_csr_id": "",
"custom_key": "",
"expires_on": "",
"hosts": [
"app.example.com",
"*.app.example.com"
],
"issuer": "",
"method": "http",
"settings": {},
"signature": "SHA256WithRSA",
"type": "dv",
"uploaded_on": "2020-02-06T18:11:23.531995Z",
"validation_errors": [
{
"message": "SERVFAIL looking up CAA for app.example.com"
}
],
"validation_records": [
{
"emails": [
"administrator@example.com",
"webmaster@example.com"
],
"http_body": "ca3-574923932a82475cb8592200f1a2a23d",
"http_url": "http://app.example.com/.well-known/pki-validation/ca3-da12a1c25e7b48cf80408c6c1763b8a2.txt",
"txt_name": "_acme-challenge.app.example.com",
"txt_value": "810b7d5f01154524b961ba0cd578acc2"
}
],
"wildcard": false
},
}
</details>
- Whenever you make changes to a custom hostname via dashboard, the value that is set for Minimum TLS version will apply. If you have a scenario as explained in the bullet above, the dashboard change will override the zone-level configuration that was being applied.
- For custom hostnames with wildcards enabled, the direct custom hostname you create (for example,
saas-customer.test) will use the hostname-specific setting, while the others (sub1.saas-customer.test,sub2.saas-customer.test, etc) will default to the zone-level setting.
Setup
<details>
<summary>
Minimum TLS version for your zone
</summary>
Refer to <a href="https://developers.cloudflare.com/ssl/edge-certificates/additional-options/minimum-tls/#zone-level">Minimum TLS version - SSL/TLS</a>.
</details>
<details>
<summary>
Minimum TLS version for custom hostname
</summary>
- In the Cloudflare dashboard, go to the Custom Hostnames page.<a href="https://dash.cloudflare.com/?to=/:account/:zone/ssl-tls/custom-hostnames">Go to Custom Hostnames ↗</a>
- Find the hostname to which you want to apply Minimum TLS Version. Select Edit.
- Choose the desired TLS version under Minimum TLS Version and select Save.
In the API documentation, refer to <a href="https://developers.cloudflare.com/api/resources/custom_hostnames/methods/edit/">SSL properties of a custom hostname</a>. A <code>PATCH</code> request replaces the existing <code>ssl.settings</code> object. Retrieve and reuse all current settings to avoid resetting unrelated values.
- Make a <code>GET</code> request to the <a href="https://developers.cloudflare.com/api/resources/custom_hostnames/methods/get/">Custom Hostname Details</a> endpoint to retrieve the current <code>ssl.settings</code> object.
<details>
<summary>
Required API token permissions
</summary>
At least one of the following <a href="https://developers.cloudflare.com/fundamentals/api/reference/permissions/">token permissions</a> is required:
- <code>SSL and Certificates Write</code>
- <code>SSL and Certificates Read</code>
</details>
Custom Hostname Detailsbash
curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/custom_hostnames/$CUSTOM_HOSTNAME_ID" \
--request GET \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
Response examplejson
"success": true,
"result": {
"id": "<CUSTOM_HOSTNAME_ID>",
"ssl": {
"id": "<CERTIFICATE_ID>",
"bundle_method": "ubiquitous",
"certificate_authority": "<CERTIFICATE_AUTHORITY>",
"custom_certificate": "",
"custom_csr_id": "",
"custom_key": "",
"expires_on": "",
"hosts": [
"app.example.com",
"*.app.example.com"
],
"issuer": "",
"method": "http",
"settings": {},
"signature": "SHA256WithRSA",
"type": "dv",
"uploaded_on": "2020-02-06T18:11:23.531995Z",
"validation_errors": [
{
"message": "SERVFAIL looking up CAA for app.example.com"
}
],
"validation_records": [
{
"emails": [
"administrator@example.com",
"webmaster@example.com"
],
"http_body": "ca3-574923932a82475cb8592200f1a2a23d",
"http_url": "http://app.example.com/.well-known/pki-validation/ca3-da12a1c25e7b48cf80408c6c1763b8a2.txt",
"txt_name": "_acme-challenge.app.example.com",
"txt_value": "810b7d5f01154524b961ba0cd578acc2"
}
],
"wildcard": false
},
}
- Copy the complete <code>ssl.settings</code> object. Change only <code>min_tls_version</code>, then make a <code>PATCH</code> request to the <a href="https://developers.cloudflare.com/api/resources/custom_hostnames/methods/edit/">Edit Custom Hostname</a> endpoint. Omit settings that were not present in the <code>GET</code> response.
<details>
<summary>
Required API token permissions
</summary>
At least one of the following <a href="https://developers.cloudflare.com/fundamentals/api/reference/permissions/">token permissions</a> is required:
- <code>SSL and Certificates Write</code>
</details>
Edit Custom Hostnamebash
curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/custom_hostnames/$CUSTOM_HOSTNAME_ID" \
--request PATCH \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--json '{
"ssl": {
"settings": {
"min_tls_version": "1.2"
}
}
}'
</details>
Cipher suites
For security and regulatory reasons, you may want to only allow connections from certain cipher suites. Cloudflare provides recommended values and full cipher suite reference in our Cipher suites documentation.
<details>
<summary>
Restrict cipher suites for your zone
</summary>
Refer to <a href="https://developers.cloudflare.com/ssl/edge-certificates/additional-options/cipher-suites/customize-cipher-suites/">Customize cipher suites - SSL/TLS</a>.
</details>
<details>
<summary>
Restrict cipher suites for custom hostname
</summary>
In the API documentation, refer to <a href="https://developers.cloudflare.com/api/resources/custom_hostnames/methods/edit/">SSL properties of a custom hostname</a>. A <code>PATCH</code> request replaces the existing <code>ssl.settings</code> object. Retrieve and reuse all current settings to avoid resetting unrelated values.
- Make a <code>GET</code> request to the <a href="https://developers.cloudflare.com/api/resources/custom_hostnames/methods/get/">Custom Hostname Details</a> endpoint to retrieve the current <code>ssl.settings</code> object.
