Testing your SSL handshake with Cloudflare using OpenSSL

The Cloudflare 525 page currently sitting in place of the site's content is one of the least ambiguous errors in hosting. A 525 means the visitor-to-Cloudflare connection worked perfectly well — the branded error page you are seeing is being delivered over a valid HTTPS session — but Cloudflare's attempt to negotiate a fresh TLS session with the origin server failed. The fault is not at the edge. It sits behind it, on the machine or network configuration that actually holds your content, and it affects Australian visitors across Sydney, Melbourne, Brisbane and Perth exactly as it affects everyone else.

Reproducing and diagnosing that failure takes a single command and a careful reading of its output. This guide walks through testing the handshake with OpenSSL, interpreting the certificate chain and cipher negotiation, and matching symptoms to fixes. You need a terminal: the macOS Terminal application, any Linux shell, or Windows 10 and 11 with the Windows Subsystem for Linux installed. If the site runs a WordPress store, a Shopify catalogue or a custom application on a .com.au or .au domain, remember that Cloudflare's proxy hides the origin only while the handshake succeeds — no request reaches your application until it does.

What Cloudflare's 525 error actually means

Cloudflare's numbering is confusing at first, so it helps to separate three codes. A 521 means Cloudflare could not open a TCP connection to the origin at all, typically because nothing is listening on the port. A 522 means the connection was established but no answer arrived before the timeout. A 525 is more specific: the TCP connection succeeded and the TLS negotiation began, then fell over. That distinction matters, because it rules out a powered-off server and points straight at certificate or protocol configuration.

Behind the error page are a handful of recurring causes: an incomplete certificate chain where the intermediate certificate was never installed alongside the leaf, an origin that only speaks a TLS version Cloudflare will not offer, a cipher suite intersection that resolves to nothing, a Server Name Indication rule that serves the wrong certificate, an expired certificate, a firewall that silently drops Cloudflare's source addresses, or a misconfigured port that forwards traffic to a service which speaks plain HTTP on 443.

Australian hosting conditions add their own wrinkles. If the origin sits in a Sydney or Melbourne data centre and the firewall permits only your office IP range, Cloudflare's edge addresses look like foreign traffic and get dropped. If the origin runs on a local VPS or colocation rack, the provider's default rules may block entire datacentre ranges. Auditors and security teams in Australia also expect modern protocol hygiene, which means legacy ciphers and TLS 1.0 are no longer acceptable on sites that handle customer records.

Commands and checks to have ready

OpenSSL ships with macOS (as LibreSSL), with most Linux distributions, and inside WSL on Windows. Run openssl version -a first to see what you are working with; LibreSSL omits a few flags, but s_client, x509 and c_rehash behave as expected. The following checks each answer a different question, so use them in sequence rather than reaching for a browser window.

Command What it reveals Best used for
openssl s_client -connect Full handshake transcript, protocol, cipher and certificate chain Reproducing the 525 against the origin
curl -vk --resolve host:443:IP Whether a complete HTTP response follows the handshake Confirming end-to-end behaviour
openssl x509 -noout -subject -issuer -dates Issuer, subject and validity window Checking expiry and clock skew
openssl s_client -tls1_2 or -tls1_3 Behaviour under one forced protocol version Isolating a version mismatch

Always pass -servername with the public hostname, even when connecting to a raw IP address. Without it, the server may fall back to a default_server block and present the wrong certificate, which looks identical to a handshake failure but is really a routing problem. Also remember to connect to the origin address rather than the Cloudflare address — the edge already proves it can negotiate with browsers, so testing the hostname through Cloudflare will show a working handshake and tell you nothing about the fault.

Running the handshake test against Cloudflare

Start by finding the real origin address. If DNS still points at Cloudflare, look it up in the hosting provider's control panel, an old DNS export, a server configuration file or your own records. Once you have it, run the transcript with something like openssl s_client -connect 203.0.113.10:443 -servername example.com.au -state -showcerts, adding -tls1_2 or -tls1_3 when you want to pin a protocol.

In a healthy result you should see CONNECTED, a protocol line such as TLSv1.3, a negotiated cipher such as TLS_AES_256_GCM_SHA384, a chain numbered from 0 through 1 or 2, and Verify return code: 0 (ok). A failed result is equally recognisable: no peer certificate available, Cipher is (NONE), or an outright alert such as sslv3 alert handshake failure. An alert sent by the server points at certificate validation or version negotiation on the origin; a silent hang points at a firewall or a service that is not answering in TLS at all.

Run the test from a home connection on the NBN, then repeat it from a Perth-hosted machine to see whether the outcome changes with the path. To check the whole request rather than the negotiation alone, force the same address with curl -vk --resolve example.com.au:443:203.0.113.10 https://example.com.au/, which bypasses Cloudflare's proxy and confirms that your web server answers correctly once the handshake completes.

Reading the chain, cipher and negotiation output

The chain printed by -showcerts starts with the leaf certificate at depth zero and continues with any intermediates. If only one certificate appears where two are expected, the intermediate is missing from the server's configuration, and that single omission is the most common trigger for a 525 under Full (strict) mode. Pipe the certificate into openssl x509 -noout -subject -issuer -dates -text to inspect it directly, and add -checkend 2592000 to confirm it will not expire in the next thirty days.

A Cipher is (NONE) result with no peer certificate usually means the server rejected the offer outright. Test each protocol separately: if -tls1_2 completes but -tls1_3 fails, the origin's TLS 1.3 support is broken, often because an old library or a missing RSA or ECDSA key is involved. If the reverse happens, the origin still requires TLS 1.0 or 1.1, which Cloudflare will refuse. Certificate lifetimes also run on a clock that can look strange by human standards — a year on Venus stretches to about 224.7 Earth days, while most publicly issued certificates now cover only 90 days, so automated renewal is no longer optional.

Check the dates carefully. A certificate whose validity starts tomorrow usually indicates a server clock that has drifted, and a mismatch between the notBefore and notAfter fields points at the same problem. Australian servers should synchronise with a national or regional NTP pool, because a skewed clock breaks handshake verification even when the certificate itself is perfectly valid.

Common causes and how to confirm each one

Certificate chain problems and strict-mode settings come first. Under Full (strict), Cloudflare validates the origin certificate against its own trust store, so an expired, self-signed or incomplete chain fails immediately. Under Flexible mode, traffic is only encrypted between visitor and edge, which is discouraged for Australian sites handling customer or health information. Confirm your chain locally before switching modes, and keep Full (strict) as the target rather than dropping to Full to hide the symptom.

Server configuration comes next. On nginx, verify that ssl_protocols TLSv1.2 TLSv1.3; is set, that ssl_certificate points at the full chain file rather than the leaf alone, and that no ssl_reject_handshake on; directive is active, a setting several hosting panels enable by default. On Apache, check that SSLCertificateFile references the full chain. On IIS, confirm the HTTPS binding uses the intended thumbprint, since sites migrated from shared Australian hosts often keep a stale binding. Plenty of 525s also come from a development server — a local Node, Laravel or WordPress instance on port 443 — that was briefly exposed while a .com.au build was being tested.

Finally, consider the network and the timeout. Cloudflare keeps retrying for roughly thirty seconds before returning the 525 page, and a firewall that drops packets produces a different code than a failed negotiation. Allow Cloudflare's published address ranges at the origin and deny direct public access, then confirm with dig +short that your DNS still resolves to Cloudflare. If you can reach the origin by IP but not by hostname, suspect SNI or virtual host routing rather than certificates.

A repeatable check before traffic goes live

Work through these steps after every certificate renewal, server migration or DNS change, and save the transcript each time so you can compare results. Keep it short enough that a weekend on-call roster actually follows it.

Restoring the site and keeping it online

Once the handshake completes cleanly, leave Cloudflare in Full (strict) mode, keep Always Use HTTPS enabled, and turn on opportunistic encryption so that connections negotiate the fastest available protocol. If you operate more than one property, a load balancer monitor will flag a failing origin before customers see the error page, and Health Checks will remove a sick node from rotation automatically. Schedule the OpenSSL check on a recurring cron job or uptime monitor so a certificate that expires over the Easter break is caught by the machine rather than by a customer in Adelaide — the same principle behind the Telegram sleep timer that ends a call when its limit is reached instead of relying on anyone to remember.

If you cannot produce a clean transcript, escalate to your hosting provider with the 525 timestamps, the failing cipher suite and the server's certificate details, and ask them to verify the chain on the origin itself. If the site handles personal information, review your obligations under the Privacy Act 1988 and the Notifiable Data Breaches scheme, including notification to the Office of the Australian Information Commissioner where the threshold is met.

Run the handshake test now, capture the transcript, and hand it to your host with a precise diagnosis. That single command is the fastest route from a blank error page to a working site for every visitor in Sydney, Melbourne, Perth and everywhere else.