How to configure a full certificate chain for Cloudflare origins
A Cloudflare 525 SSL handshake failure means visitors can reach Cloudflare’s edge, but Cloudflare cannot establish a secure connection with the origin server. The intended website is replaced by the error because the second TLS connection never completes. In many cases, the origin sends only its leaf certificate while omitting the intermediate certificate authorities required to build a trusted path.
This guide explains how to configure your web server to present the full certificate chain to Cloudflare, verify the result and move safely to Full (strict) encryption. The work centres on the server certificate, intermediate certificates and private key as a matching set, rather than changing Cloudflare’s public edge certificate.
| Origin certificate setup | What Cloudflare receives | Likely result |
|---|---|---|
| Leaf certificate only | An incomplete trust path | 525 handshake failure |
| Leaf plus intermediate certificates | A complete server chain | Successful origin validation |
| Correct chain with the wrong key | A certificate and key mismatch | 525 handshake failure |
| Expired or hostname mismatch | Invalid identity or validity | 526 error or rejection |
Diagnose the handshake failure at the origin
Cloudflare operates one TLS connection with the visitor and another with the origin. A failure between Cloudflare and the origin causes the 525 page, even though the visitor’s connection to Cloudflare remains healthy. Check the origin certificate independently before changing DNS, proxy status or Cloudflare’s encryption mode.
Run a direct test against the original server IP while preserving the intended hostname for Server Name Indication. This command displays the certificates presented by the origin: openssl s_client -connect ORIGIN_IP:443 -servername www.example.com.au -showcerts. A direct curl request using --resolve can confirm the same path when the origin is still firewalled to Cloudflare. Look for a missing intermediate, an expired certificate, a hostname mismatch, an unsupported TLS version or a private key that does not match.
Origin logs often reveal whether the handshake stopped before or during client authentication. Firewall rules, an overloaded listener and outdated cipher settings can produce similar symptoms. If the deployment bundle arrived through Telegram, a Telegram file download guide can help with retrieving the file, although its SHA-256 fingerprint should be compared with the certificate supplied by the authority.
Assemble the certificate chain in the correct order
A complete chain contains the server’s leaf certificate first, followed by one or more intermediate certificates in issuer order. The root certificate is normally omitted because clients already trust it through their operating system or browser. Sending the root is not harmful in every configuration, but it is unnecessary and can complicate validation.
For manually installed certificates, concatenate the files in this form: cat server.crt intermediate.crt > fullchain.pem. Confirm the order with openssl crl2pkcs7 -nocrl -certfile fullchain.pem | openssl pkcs7 -print_certs -noout. Let’s Encrypt installations commonly provide the required bundle as /etc/letsencrypt/live/example.com.au/fullchain.pem; the separate file privkey.pem contains the private key and must never be appended to the public chain.
Check the certificate’s start date, expiry date, subject alternative names and key algorithm before deployment. When renewal falls in November, cross-check the recorded expiry against an independent November days review so a transposed date does not become a surprise. Also compare the certificate and private-key public keys to ensure they match.
Install the chain on common web servers
Nginx normally accepts the complete chain and private key as separate files. Point ssl_certificate at the combined bundle and keep ssl_certificate_key restricted to the server administrator:
server {
listen 443 ssl http2;
server_name www.example.com.au;
ssl_certificate /etc/ssl/example.com.au/fullchain.pem;
ssl_certificate_key /etc/ssl/example.com.au/privkey.pem;
location / {
root /var/www/example;
}
}
Apache with mod_ssl uses the equivalent directives: SSLCertificateFile /etc/ssl/example.com.au/fullchain.pem and SSLCertificateKeyFile /etc/ssl/example.com.au/privkey.pem. Managed platforms such as cPanel can deploy the bundle through SSL/TLS Status or AutoSSL, while still requiring confirmation that the resulting host serves the intermediate certificate.
After changing the files, test the configuration and reload the service rather than restarting it unnecessarily. Nginx uses nginx -t followed by systemctl reload nginx, while Apache commonly uses apachectl configtest and systemctl reload apache2. For distributed teams, a Telegram screen sharing guide can support a live handover, provided private keys, passwords and origin addresses are redacted from any recording.
Verify the chain before enabling Full strict
Test the origin directly and confirm that the server sends its leaf certificate followed by every required intermediate. The verification should complete without an “unable to get local issuer certificate” error. Repeat the check with the hostname, because a certificate can have a valid chain while still lacking the correct name for the requested domain.
Once the origin test succeeds, select Full (strict) in Cloudflare’s SSL and TLS settings. This mode encrypts the origin connection and validates the certificate’s trust chain and hostname. Flexible mode does not protect the visitor-to-origin journey, while Full encrypts without validating the origin identity and should not be treated as a substitute for strict validation.
Use these controls to make the repair durable:
- Keep the full chain outside the public document root and restrict the private key to the web-server account.
- Automate certificate renewal and reload the web server after each successful deployment.
- Monitor expiry dates, renewal failures and unexpected changes to the origin certificate fingerprint.
- Require TLS 1.2 or 1.3 and retain only cipher suites supported by both Cloudflare and the origin.
- Keep the previous certificate, chain and key available in a controlled rollback bundle until the new configuration is verified.
- Record the issuer, chain order, renewal procedure and responsible Australian team in the service runbook.
Cloudflare should be configured last, after the origin has passed a direct TLS test. A proxied DNS record can appear healthy while the origin remains broken, so use origin-level checks and Cloudflare diagnostics together rather than relying on the public page alone.
Keep Australian sites secure through renewal
Australian businesses commonly use .com.au or .au domains with local registrars, making it important to confirm that the certificate contains the exact hostname visitors request, including any www variant. Local hosting regions in Sydney, Melbourne and Brisbane can reduce latency, while an origin near the main audience gives Cloudflare a stable upstream connection regardless of a visitor’s location.
Maintenance schedules should account for Australian Eastern Standard Time and daylight-saving changes, as a certificate window that appears correct can still cause an incident when server clocks or team diaries disagree. Australian operational teams often call the afternoon “arvo”, but the runbook should include the precise date, time zone and UTC offset. Certificate lifecycle controls also support the configuration-management and incident-response expectations associated with the Australian Signals Directorate’s Essential Eight.
Open the origin host today, export the current chain and test it directly against the production hostname. If the chain is incomplete, replace the leaf-only file with the verified bundle, reload the service and enable Full (strict) only after the handshake succeeds. Set automated expiry alerts before handing the repair back to the operations team.