Skip to content
HTTP status codes3 min read

Cloudflare error 526: Invalid SSL certificate

Error 526: Invalid SSL certificate

Short answer

Cloudflare shows error 526 when SSL mode is Full (strict) and the certificate on your origin server isn't valid: it has expired, is self-signed, or doesn't cover the hostname. The fix is to install a valid certificate on the server, such as a free AutoSSL one, not to lower the encryption mode.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. Causes of error 526
  2. Step-by-step fix
  3. Prevention
  4. On ArabyHost

In Full (strict) mode Cloudflare doesn’t just encrypt the connection to your server; it also checks that the certificate is genuine: issued by a trusted authority, not expired, and covering the requested hostname. If any check fails, Cloudflare refuses the connection and shows 526. That’s the correct behavior (it protects you from an impostor server) so the fix is to repair the certificate, not to switch the check off.

Causes of error 526

  • An expired certificate on the origin because automatic renewal failed.
  • A self-signed certificate, such as the default one before AutoSSL issues a real certificate.
  • The certificate doesn’t cover the hostname: issued for example.com while the request is for www.example.com or shop.example.com.
  • The server presents its generic hostname certificate because the domain isn’t added to the account, or the Cloudflare record points to a different server.
  • An incomplete chain: a manually installed certificate without its intermediate (CA bundle).

Step-by-step fix

  1. Inspect the certificate the origin presents, bypassing Cloudflare:

    openssl s_client -connect 203.0.113.10:443 -servername example.com </dev/null 2>/dev/null \
      | openssl x509 -noout -subject -issuer -dates -ext subjectAltName

    Use your server’s IP. Check notAfter (expiry), issuer (if it matches the subject, it’s self-signed) and the names under subjectAltName.

  2. Issue a new certificate. In cPanel open Security » SSL/TLS Status, make sure every name you use (domain, www, subdomains) is selected, then click Run AutoSSL.

  3. If issuance fails while proxied, set the record to DNS only (grey cloud) temporarily, run AutoSSL, then re-enable the proxy. Also check that .htaccess doesn’t block /.well-known/ and that any CAA records allow the issuing authority. Details in why AutoSSL fails.

  4. If the certificate was installed manually, remove the old one in cPanel » Security » SSL/TLS » Manage SSL sites and run AutoSSL, or install the new certificate with the full CA bundle.

  5. Alternative: create a Cloudflare Origin certificate under SSL/TLS » Origin Server » Create Certificate and install it in Manage SSL sites. Cloudflare trusts it in Full (strict), but it stops working for visitors if you turn the proxy off.

  6. Keep the mode on Full (strict) in SSL/TLS » Overview and test in a private window.

Prevention

  • Let AutoSSL handle renewals and avoid manual certificates unless you need them; a manual certificate won’t renew itself.
  • Before proxying any new subdomain, confirm the origin certificate covers it.
  • Act on AutoSSL failure notices straight away; if renewal keeps failing, 526 or an expired certificate error follows once the certificate runs out.

On ArabyHost

AutoSSL certificates are issued free and automatically as soon as the domain points to the server. They’re publicly trusted, so Cloudflare accepts them in Full (strict): the mode to use with your hosting. Open cPanel with one click from the Araby Panel to review SSL/TLS Status and run AutoSSL, and ask the Araby AI assistant in the panel to read the error log and explain any failure. Arabic-speaking support can help with setup, and the full walkthrough is in using Cloudflare with your hosting.

FAQ

Why does the error go away when I switch from Full (strict) to Full?

Full mode accepts any certificate on the origin without checking its validity or name. That only hides the problem; fix the certificate and go back to Full (strict).

My browser shows a valid padlock, so why do I get 526?

Your browser sees Cloudflare's edge certificate, which is fine. Error 526 is about your origin server's certificate, which Cloudflare checks and visitors never see.

How soon does 526 clear after fixing the certificate?

Usually within minutes, as Cloudflare checks the origin certificate on new connections. Open the site in a private window to confirm.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.