Early Hints for SaaS

Last updated Oct 15, 2026 allows the browser to begin loading resources while the origin server is compiling the full response. This improves webpage’s loading speed for the end user. As a SaaS provider, you may prioritize speed for some of your custom hostnames. Using custom metadata, you can enable Early Hints per custom hostname.


Prerequisites

Before you can employ Early Hints for SaaS, you need to create a custom hostname. Review Get Started with Cloudflare for SaaS if you have not already done so.


Enable Early Hints per custom hostname via the API

  1. Locate your zone ID, available in the Cloudflare dashboard.
  2. Locate your Authentication Key on the API Tokens ↗︎ page, under Global API Key.
  3. If you are creating a new custom hostname, make an API call such as the example below, specifying "early_hints": "on":

<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>

Create Custom Hostnamebash

curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/custom_hostnames" \
    --request POST \
    --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
    --json '{
        "hostname": "<CUSTOM_HOSTNAME>",
        "ssl": {
                "method": "http",
                "type": "dv",
                "settings": {
                        "http2": "on",
                        "min_tls_version": "1.2",
                        "tls_1_3": "on",
                        "early_hints": "on"
                },
                "bundle_method": "ubiquitous",
                "wildcard": false
        }
    }'
  1. For an existing custom hostname, use a GET call to retrieve its id and current ssl.settings values:

<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>

List Custom Hostnamesbash

curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/custom_hostnames?hostname=%7Bhostname%7D" \
    --request GET \
    --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN"

For example, the response may contain the following settings:

{
  "ssl": {
    "settings": {
      "ciphers": [
        "ECDHE-ECDSA-AES128-GCM-SHA256",
        "ECDHE-RSA-AES128-GCM-SHA256"
      ],
      "early_hints": "off",
      "http2": "on",
      "min_tls_version": "1.2",
      "tls_1_3": "on"
    }
  }
}
  1. Copy the complete ssl.settings object from the response. Change only early_hints to on, then make a PATCH call:

<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": {
                        "ciphers": [
                                "ECDHE-ECDSA-AES128-GCM-SHA256",
                                "ECDHE-RSA-AES128-GCM-SHA256"
                        ],
                        "early_hints": "on",
                        "http2": "on",
                        "min_tls_version": "1.2",
                        "tls_1_3": "on"
                }
        }
    }'

A PATCH request replaces the existing ssl.settings object. The example copies every setting from the sample response. Copy the values from your response, and omit settings that were not present.

Was this helpful?

YesNo

On this page

Early Hints for SaaS - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/performance/early-hints-for-saas/#page","headline":"Early Hints for SaaS","description":"Enable Early Hints per custom hostname to preload resources and speed up page loads.","url":"https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/performance/early-hints-for-saas/","inLanguage":"en","image":"https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/performance/early-hints-for-saas/og.png?v=74ad1d266e95344b","dateModified":"2026-10-15","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: Learn what features and limits are part of various Cloudflare plans. title: Plans image: https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/plans/og.png?v=fb7c74f82ed93825


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/cloudflare-for-platforms/llms.txt
Use this file to discover all available pages before exploring further.