Cloudflare Docs
Visit SSL/TLS on GitHub
Set theme to dark (⇧+D)

Per-hostname authenticated origin pulls

When you enable Authenticated Origin Pulls per hostname, all proxied traffic to the specified hostname is authenticated at the origin web server. Customers can use client certificates from their Private PKI to authenticate connections from Cloudflare.

​​ 1. Upload custom certificate

First, follow the API instructions to upload a custom certificate to Cloudflare, but use the /origin_tls_client_auth/hostnames/certificates endpoint.

In the API response, save the certificate id since it is required for the next step.

​​ 2. Enable Authenticated Origin Pulls (globally)

Then, enable Authenticated Origin Pulls as an option for your Cloudflare zone.

To enable Authenticated Origin Pulls in the dashboard:

  1. Log in to your Cloudflare account and go to a specific domain.
  2. Go to SSL/TLS > Origin Server.
  3. For Authenticated Origin Pulls, switch the toggle to On.

To enable or disable Authenticated Origin Pulls with the API, send a PATCH request with the value parameter set to your desired setting ("on" or "off").

​​ 3. Enable Authenticated Origin Pulls for the hostname

Finally, use the Cloudflare API to send a PUT request to enable Authenticated Origin Pulls for specific hostnames.