Behind Cloudflare, every request travels in two legs: visitor to Cloudflare, then Cloudflare to your server. Error 525 is about the second leg only. The visitor reached Cloudflare securely, but when Cloudflare connected to port 443 on your server, the two sides couldn’t agree on a TLS connection.
When does 525 appear?
Only when Cloudflare’s encryption mode is Full or Full (strict), because in those modes Cloudflare connects to your origin over HTTPS. During the handshake Cloudflare sends the hostname it wants (SNI) and expects the server to answer with a certificate and a shared protocol. If the server closes the connection, answers with something that isn’t TLS, or has no version or cipher in common, the handshake fails and you get 525.
Common causes
- No SSL certificate on the server for the domain or the requested subdomain (
www,shop, …). - Port 443 closed on the server, or a firewall cutting Cloudflare’s connections.
- The DNS record in Cloudflare points to an old or wrong IP, such as a previous server that doesn’t serve the site over HTTPS.
- An outdated server without SNI support or without any TLS version or cipher Cloudflare accepts.
- The web service restarting mid-request, so the error shows briefly and then clears.
Step-by-step fix
-
Check the IP. In Cloudflare open DNS » Records and make sure the A records for the domain and
wwwpoint to the server IP shown in your hosting panel. -
Test the origin directly, bypassing Cloudflare:
openssl s_client -connect 203.0.113.10:443 -servername example.com </dev/nullUse your server IP and domain. If the connection drops without showing a certificate, or you see
handshake failure, the problem is on the server. -
Issue a free certificate. In cPanel open Security » SSL/TLS Status, check that the domain and
wwwhave a valid certificate, then click Run AutoSSL. -
If AutoSSL fails while proxied, domain validation may be blocked. Set the record to DNS only (grey cloud) temporarily, run AutoSSL, then turn the proxy (orange cloud) back on. Also make sure your
.htaccessrules don’t block/.well-known/. If it still fails, see why AutoSSL fails. -
Set the encryption mode. In Cloudflare open SSL/TLS » Overview and choose Full (strict) (in the newer interface: Configure, then Custom SSL/TLS).
-
Test in a private window after a minute or two.
Alternative: a Cloudflare Origin certificate
You can create a certificate in Cloudflare under SSL/TLS » Origin Server » Create Certificate and install it, with its private key, in cPanel » Security » SSL/TLS » Manage SSL sites. Only Cloudflare trusts this certificate, so the site must always stay proxied; otherwise visitors get NET::ERR_CERT_AUTHORITY_INVALID.
Prevention
- Don’t proxy a new subdomain through Cloudflare until it has a certificate on the server.
- When moving to a new server, update the A records in Cloudflare and confirm the certificate is issued before shutting down the old account.
- Don’t rely on Flexible mode: it hides the problem and leaves the link to your server unencrypted.
On ArabyHost
AutoSSL certificates are issued free and automatically as soon as the domain points to the server, so usually all you need is an A record in Cloudflare with the right IP and a click on Run AutoSSL in cPanel, which opens with one click from the Araby Panel. Because the server has a valid certificate, use Full (strict), not Flexible. The Araby AI assistant in the panel reads your error logs and explains what’s going on, and Arabic-speaking support can help if you need it. For the full setup see using Cloudflare with your hosting and getting a free SSL certificate.
FAQ
Should I fix 525 by switching SSL mode to Flexible?
The error disappears because Cloudflare then talks to your server over plain HTTP, but that leg becomes unencrypted and you may get a redirect loop. The right fix is a certificate on the server and Full (strict).
What's the difference between 525 and 526?
With 525 the handshake itself fails, so no HTTPS connection is made. With 526 the handshake completes but Cloudflare rejects the certificate because it's expired, self-signed or doesn't cover the hostname.
Can a visitor fix error 525?
No. It's a problem between Cloudflare and the origin server, so clearing cache or switching browsers won't help. Only the site owner can fix it.