Category: Web Server and InfrastructureUpdated 2026-10-27

Authenticated Origin Pulls

Authenticated Origin Pulls (AOP) is a Cloudflare feature that uses mutual TLS between Cloudflare and your server. Cloudflare presents a client certificate when it connects to the origin, and your web server rejects connections without a valid one. It helps ensure requests come from Cloudflare, but the default shared certificate does not show which customer sent them.

Authenticated Origin Pulls in three steps: Cloudflare shows a client certificate, nginx verifies it, then serves or refuses
Authenticated Origin Pulls makes the origin check a client certificate on every connection from Cloudflare.

How Authenticated Origin Pulls works

In normal TLS only the server shows a certificate. With Authenticated Origin Pulls the connection is mutual: Cloudflare also presents a client certificate, and your web server checks it against a certificate authority you trust. A request without a valid certificate is refused before your application sees it.

The Cloudflare documentation describes three levels. Global uses a certificate provided by Cloudflare. Zone-level uses a certificate you upload and applies to the whole zone. Per-hostname uses a certificate you upload for chosen hostnames. The more specific level takes precedence, and the three are independent of each other. The feature is available on all plans.

It needs the SSL/TLS mode set to Full or higher and does not apply in Off or Flexible. It also sits next to the other origin controls: it answers who may talk to the server, while the origin server IP entry covers what happens when the address itself is known.

nginx setup: ssl_client_certificate and ssl_verify_client

Two nginx directives do the work. ssl_client_certificate names a file with trusted CA certificates in PEM format. ssl_verify_client defaults to off and accepts on, off, optional and optional_no_ca. The result is stored in $ssl_client_verify as SUCCESS, FAILED with a reason, or NONE.

ssl_client_certificate /etc/nginx/certs/origin-pull-ca.pem;
ssl_verify_client optional;

Cloudflare's global setup page links its CA file and gives the same pair. Start with optional, check that traffic still works, then change it to on. Run sudo nginx -t before every reload. Put both in the nginx server block that holds your certificate. With on, a request without a valid client certificate gets a 400 error.

For your own certificate, the zone-level page says to upload a leaf certificate, because a root CA is rejected, and to save the CA that signed it on the origin.

What we ran on a test CA

We tested the nginx side only, in an Ubuntu 24.04 container with nginx 1.24.0 and a CA generated with openssl. We did not use Cloudflare's real certificate or a Cloudflare zone.

curl --resolve example.com:443:127.0.0.1 -k --cert client.crt --key client.key https://example.com/

The test shows the nginx logic. Whether Cloudflare presents its certificate correctly on your zone is something to confirm after you enable it, as in the origin lockdown guide.

Limits and cautions

The global certificate is shared across all Cloudflare accounts, according to the docs. It confirms that a request came from the Cloudflare network, not from your account, so for stricter control use a zone-level or per-hostname certificate of your own. Cloudflare sends notices 30 and 14 days before such a certificate expires, and an expired one is an outage you create yourself.

AOP does not hide the server. The TLS handshake completes and nginx answers 400, as our test showed, so the connection is still accepted and the IP is still reachable. Pair it with a firewall that drops non-Cloudflare traffic. It protects the HTTPS service only, so SSH and other ports need their own rules.

It is not compatible with Cloudflare Tunnel, which has no inbound listener to present a client certificate to. And switching to on before the setup works takes the site offline for every visitor.

Related terms: Origin server IP, TLS/SSL, nginx, Reverse proxy, Firewall.

Frequently asked questions

Is Authenticated Origin Pulls the same as the Cloudflare Origin CA certificate?

No. In Full (strict) mode Cloudflare validates your server certificate. Authenticated Origin Pulls is the other direction: your server validates the client certificate Cloudflare presents. Cloudflare says the two CAs are different.

Does Authenticated Origin Pulls work on the free plan?

Yes. Cloudflare documents it as available on all plans. It still requires the Full or Full (strict) SSL/TLS mode.

Which ssl_verify_client value should I start with?

Start with optional, confirm the site still works, then switch to on. Cloudflare recommends this order because on rejects requests without a valid client certificate.

Why does nginx return 400 No required SSL certificate was sent?

ssl_verify_client is on and the client sent no certificate. In our test a plain curl got this error, and curl with a certificate from the configured CA got 200.

Does Authenticated Origin Pulls work with Cloudflare Tunnel?

No. Cloudflare lists it as not compatible, because a tunnel has no inbound listener that could ask for a client certificate.

Want to see where your own server stands?

Run the free, read-only server check, or open the Security Lab and watch the detect, contain, recover, verify loop in action.

Get your free server checkOpen the Security Lab