Zone-level
When you enable zone-level Authenticated Origin Pulls (AOP), all proxied traffic to your zone is authenticated at the origin web server using a certificate that you upload. Unlike global AOP, which uses a Cloudflare-provided certificate shared across all accounts, zone-level AOP uses your own certificate for stricter security.
Global, zone-level, and per-hostname AOP are independent configurations. Enabling or disabling one does not affect the others.
Make sure your zone is using an SSL/TLS encryption mode of Full or higher.
Zone-level AOP requires you to upload your own certificate. Refer to the steps below for an example of how to generate a custom certificate using OpenSSL. The CA root certificate that you use to issue the custom certificate should be the same CA that you will upload to your origin.
OpenSSL example
- Run the following command to generate a 4096-bit RSA private key, using AES-256 encryption. Enter a passphrase when prompted.
openssl genrsa -aes256 -out rootca.key 4096- Create the CA root certificate. When prompted, fill in the information to be included in the certificate. For the
Common Namefield, use the domain name as value, not the hostname.
openssl req -x509 -new -nodes -key rootca.key -sha256 -days 1826 -out rootca.crt- Create a Certificate Signing Request (CSR). When prompted, fill in the information to be included in the request. For the
Common Namefield, use the hostname as value.
openssl req -new -nodes -out cert.csr -newkey rsa:4096 -keyout cert.key- Sign the certificate using the
rootca.keyandrootca.crtcreated in previous steps.
openssl x509 -req -in cert.csr -CA rootca.crt -CAkey rootca.key -CAcreateserial -out cert.crt -days 730 -sha256 -extfile ./cert.v3.ext- Make sure the certificate extensions file
cert.v3.extspecifies the following:
basicConstraints=CA:FALSE-
Go to the Origin Server page.
Go to Origin Server -
Select the Authenticated Origin Pulls tab.
-
In the Zone-level section, select Upload certificate.
-
Paste the certificate and private key, then select Continue.
-
Review your certificate details, save the certificate ID for future reference, and select Done.
Use the Upload a zone-level client certificate endpoint to upload your certificate.
Upload the CA root certificate used to sign your client certificate to your origin server. Your origin will use this CA certificate to verify the client certificate presented by Cloudflare.
With the certificate installed, set up your origin web server to accept client certificates.
Check the examples below for Apache and NGINX or refer to your origin web server documentation - for example, HAProxy ↗, Traefik ↗, Caddy ↗.
Apache example
SSLCACertificateFile /path/to/origin-pull-ca.pemFor this example, you would have saved your certificate to /path/to/origin-pull-ca.pem.
NGINX example
ssl_verify_client optional;ssl_client_certificate /etc/nginx/certs/cloudflare.crt;For this example, you would have saved your certificate to /etc/nginx/certs/cloudflare.crt.
At this point, you may also want to enable logging on your origin so that you can verify the configuration is working.
-
Go to the Origin Server page.
Go to Origin Server -
Select the Authenticated Origin Pulls tab.
-
In the Zone-level section, switch the toggle to On.
Use the Set Enablement for Zone endpoint to enable zone-level Authenticated Origin Pulls.
Once you can confirm everything is working as expected for your specific origin setup, configure your origin to enforce the authentication.
Apache example
SSLVerifyClient requireNGINX example
ssl_verify_client on;After completing the process, you can use curl to send requests directly to your origin IPs, verifying that the requests fail due to certificate validation being enforced.
You can configure alerts to receive notifications before your AOP certificates expire.
Zone-level Authenticated Origin Pulls Certificate Expiration Alert
Who is it for?Customers that upload their own certificate to use with zone-level Authenticated Origin Pull (AOP) to secure connections from Cloudflare to their origin server. AOP certificate expiration notifications are sent 30 days and 14 days before the certificate expiry.
Other options / filtersNone.
Included withAuthenticated Origin Pull.
What should you do if you receive one?Upload a renewed certificate to use for zone-level AOP.
Refer to Cloudflare Notifications for more information on how to set up an alert.
Refer to Manage certificates for further options.