Troubleshooting
Cloudflare SSL WordPress Not Working: Causes and How to Fix It

Short answer
Set the SSL/TLS mode to Full (strict) and install a valid or Cloudflare Origin CA certificate on your server. Then make sure the DNS records are proxied, the edge certificate is active, and WordPress uses https URLs. Purge caches before testing again.
Key takeaways
- Flexible mode causes most redirect loops on WordPress.
- Full (strict) needs a valid or Cloudflare Origin CA certificate on the server.
- Errors 525 and 526 point to problems with the origin certificate.
- Grey-cloud DNS records bypass Cloudflare's certificate.
- Update WordPress URLs to https and fix mixed content.
- Purge caches and test privately after every change.
Why is Cloudflare SSL not working on WordPress?
Cloudflare SSL on WordPress usually fails because the SSL/TLS encryption mode does not match the origin server, the DNS record is not proxied, the edge certificate is not active yet, or WordPress still uses http URLs.
Cloudflare sits between visitors and your server. That means there are two connections to secure:
- Visitor to Cloudflare, which uses Cloudflare's edge certificate.
- Cloudflare to your server, which depends on your origin certificate and the encryption mode you choose.
Most problems happen when these two halves do not agree. A setting that is fine on one site causes a redirect loop or a 525 error on another.
Start by noting the exact symptom. The table below maps each one to the likely cause, and the sections after it explain each fix.
| Symptom | Likely cause |
|---|---|
| Too many redirects | Flexible mode with HTTPS forced on the server |
| Error 525 | Full mode but the origin has no working SSL |
| Error 526 | Full (strict) with an invalid origin certificate |
| Browser says not secure | DNS-only record, or certificate not issued yet |
| Padlock broken on some pages | Mixed content from http URLs |
| Cipher mismatch error | Edge certificate not covering that hostname |
If you have not finished setup, our guide on setting up Cloudflare for WordPress covers the full process.
Which SSL/TLS mode should you use?
Use Full (strict) whenever your server has a valid certificate, because it encrypts both connections and checks the origin certificate; Flexible causes most WordPress SSL problems.
Cloudflare offers several encryption modes in SSL/TLS > Overview:
- Off: no HTTPS. Not recommended.
- Flexible: HTTPS from visitor to Cloudflare, plain HTTP from Cloudflare to your server.
- Full: HTTPS on both connections, but Cloudflare accepts any origin certificate, even self-signed.
- Full (strict): HTTPS on both connections, and the origin certificate must be valid.
The Cloudflare encryption modes documentation explains each mode in detail.
Flexible looks easy because your server needs no certificate. In practice it causes loops and confused WordPress settings, and the second half of the connection is not encrypted.
Our guide to Cloudflare SSL settings for WordPress explains the recommended configuration in more depth.
Why does Cloudflare cause too many redirects?
A redirect loop usually means Cloudflare is in Flexible mode while your server or a plugin forces HTTPS, so each HTTP request from Cloudflare is redirected back to HTTPS forever.
Here is what happens:
- A visitor requests
https://example.com. - Cloudflare, in Flexible mode, asks your server for
http://example.com. - Your server or a plugin such as Really Simple SSL redirects to HTTPS.
- Cloudflare receives the redirect, passes it on, and the cycle repeats.
The fix is to install a certificate on your server and switch to Full (strict). If you cannot do that right away, remove the server-side HTTPS redirect and let Cloudflare's Always Use HTTPS handle it.
Cloudflare has a dedicated page on fixing too many redirects. Our guide on fixing a Cloudflare redirect loop shows the WordPress side.
Why do you see error 525 or 526?
Error 525 means Cloudflare could not complete an SSL handshake with your server, and 526 means the origin certificate is invalid while Full (strict) mode is on.
Error 525 happens in Full or Full (strict) mode when your server does not answer HTTPS properly. Common reasons are no certificate installed, port 443 closed, or the server not supporting the right protocols.
Error 526 happens only in Full (strict) mode. Your server answered, but the certificate is expired, self-signed, or issued for a different domain name.
Fixes:
- Install a certificate on your server. Most hosts offer free Let's Encrypt certificates in the control panel.
- Or create a free Cloudflare Origin CA certificate and install it on the server. Cloudflare trusts it in Full (strict) mode.
- Check that the certificate covers both
example.comandwww.example.comif you use both. - Renew expired certificates and check auto-renewal.
The Cloudflare Origin CA documentation explains how to generate and install one. For a full walkthrough of the handshake error, see our guide to fixing Cloudflare error 525.
An Origin CA certificate is only trusted by Cloudflare. If you later turn Cloudflare off, browsers will show a warning, so you would need a normal certificate at that point.
Is the DNS record proxied?
Cloudflare's edge certificate only works when the DNS record is proxied, shown by an orange cloud; a grey cloud sends visitors straight to your server and its own certificate.
Go to DNS > Records in the Cloudflare dashboard and check the records for your root domain and www:
- Proxied (orange cloud): traffic goes through Cloudflare, and Cloudflare's certificate is shown.
- DNS only (grey cloud): traffic bypasses Cloudflare, so the browser sees whatever certificate your server has.
A common mistake is proxying the root domain but leaving www as DNS only, or the other way round. Visitors then get a secure padlock on one version and a warning on the other.
Also confirm the domain's nameservers point to Cloudflare. If DNS is still managed elsewhere, Cloudflare settings have no effect. Our guide on WordPress DNS settings explains the records involved.
Is the edge certificate active yet?
New domains need Cloudflare to issue a Universal SSL certificate, which is often quick but can take longer, so check SSL/TLS > Edge Certificates for an active status.
Until the edge certificate is active, visitors may see privacy errors or a cipher mismatch message. This is normal right after adding a site.
Check:
- Status: the certificate should show as active in Edge Certificates.
- Coverage: Universal SSL covers the root domain and first-level subdomains, such as
www.example.com. Deeper names likeshop.eu.example.comare not covered. - CAA records: if your DNS has CAA records, they must allow the certificate authorities Cloudflare uses.
If the certificate is stuck, the Cloudflare edge certificates documentation lists the troubleshooting steps.
Is WordPress still using http URLs?
If the padlock is broken or the admin keeps switching to http, update the WordPress Address and Site Address to https and fix any hard-coded http links in content.
Go to Settings > General and make sure both URLs start with https://. If you cannot reach the admin, set them in wp-config.php:
define( 'WP_HOME', 'https://example.com' );
define( 'WP_SITEURL', 'https://example.com' );
Old content may still contain http:// image and link URLs. These cause mixed content warnings, where the page is HTTPS but some files load over HTTP.
Ways to fix it:
- Run a search and replace on the database to change
http://example.comtohttps://example.com. - Turn on Automatic HTTPS Rewrites in Cloudflare's Edge Certificates settings as a safety net.
- Check theme and plugin settings for hard-coded http URLs.
Our guide on fixing mixed content warnings walks through the database step safely. The WordPress.org article on HTTPS for WordPress covers the core settings.
Does WordPress know it is behind HTTPS?
In Flexible mode, or with some proxies, WordPress cannot tell the visitor used HTTPS, which breaks admin logins and plugin redirects; a small wp-config snippet tells it to trust Cloudflare's header.
Cloudflare sends a header called X-Forwarded-Proto that says which protocol the visitor used. WordPress does not read it by default.
Add this near the top of wp-config.php, above the line that says to stop editing:
if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https' ) {
$_SERVER['HTTPS'] = 'on';
}
This is a workaround. The better fix is still Full (strict) mode with a certificate on the server.
If the admin area is the only part that fails, our guide to Cloudflare and wp-admin not working covers other causes such as caching rules.
Could caching or HSTS be hiding the fix?
Yes, browsers and Cloudflare cache redirects and HSTS rules, so after changing settings you should purge the Cloudflare cache and test in a private window.
Redirects, especially 301s, are cached by browsers. You might fix the problem and still see the old loop.
After any change:
- Purge everything in Cloudflare, as shown in our guide to clearing the Cloudflare cache.
- Clear your WordPress caching plugin.
- Test in a private window or a different browser.
Be careful with HSTS. Once enabled, browsers refuse to load your site over HTTP for the set period. Only turn it on after HTTPS works everywhere, including subdomains if you include them.
Quick checklist for Cloudflare SSL on WordPress
Most Cloudflare SSL problems are solved by working through the same short list in order.
- Install a valid certificate on your server.
- Set SSL/TLS mode to Full (strict).
- Make sure root and
wwwDNS records are proxied. - Confirm the edge certificate is active.
- Set WordPress URLs to https and fix mixed content.
- Turn on Always Use HTTPS once everything works.
- Purge caches and test in a private window.
If the error you see is about the protocol rather than redirects, our guide to fixing ERR_SSL_PROTOCOL_ERROR may help.
Frequently asked questions
Should I use Flexible or Full SSL in Cloudflare for WordPress?
Use Full (strict) whenever possible. Flexible leaves the connection between Cloudflare and your server unencrypted and often causes redirect loops in WordPress. Install a free certificate on your server, or a Cloudflare Origin CA certificate, then switch to Full (strict).
Why does my WordPress site show too many redirects after enabling Cloudflare?
Usually Cloudflare is in Flexible mode while your server or an SSL plugin forces HTTPS. Each request bounces between HTTP and HTTPS. Switch to Full (strict) with a certificate on the server, or remove the server-side redirect.
How long does Cloudflare take to issue an SSL certificate?
Universal SSL is often issued quickly after the domain becomes active, but it can take longer in some cases. Check the status under SSL/TLS > Edge Certificates. CAA records that block Cloudflare's certificate authorities can stop issuance completely.
Do I need Really Simple SSL with Cloudflare?
Not usually. With Full (strict), Always Use HTTPS and correct WordPress URLs, Cloudflare and WordPress handle HTTPS themselves. If you keep an SSL plugin, make sure its redirect does not conflict with Cloudflare, especially in Flexible mode.
What is a Cloudflare Origin CA certificate?
It is a free certificate that Cloudflare issues for your server. Cloudflare trusts it in Full (strict) mode, but browsers do not. It works well while your site stays behind Cloudflare, but you would need a normal certificate if you turned Cloudflare off.
Sources
- Encryption modes Cloudflare
- ERR_TOO_MANY_REDIRECTS Cloudflare
- Origin CA certificates Cloudflare
- Edge certificates Cloudflare
- HTTPS WordPress Developer Resources
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


