Blog / Web management /
Cloudflare settings that help speed and security
Cloudflare’s dashboard has dozens of toggles, and most of them sound like they’d make your site faster or safer. So people switch everything on, and then wonder why the checkout stopped working or the admin area goes round in a redirect loop.
Since starting at Nivonix, I’ve been going through the Cloudflare setup on the client sites that use it. The pattern is familiar: a few settings that matter a lot, a few that are risky if you don’t understand them, and many that make little difference either way.
This is the list I work through on a typical WordPress or small business site on the free plan. (If you’re new to what Cloudflare actually does, start with DNS, SSL and Cloudflare: what site owners should know.)
Before you change anything
- Write down the current settings, or take screenshots. If something breaks, you want to know what you changed.
- Change one area at a time, then test: the homepage, a page, logging in, the contact form, and for shops, adding to cart and checkout.
- Know where the “pause” button is. In the overview page, you can pause Cloudflare for the whole site. In an emergency, that sends traffic straight to your server.
SSL/TLS: get this right first
Encryption mode: Full (strict)
Under SSL/TLS → Overview, the mode decides how Cloudflare connects to your server.
- Flexible encrypts visitor to Cloudflare, but not Cloudflare to your server. It’s a common cause of redirect loops on WordPress, because the site thinks it’s on HTTP and keeps redirecting to HTTPS.
- Full encrypts both legs but doesn’t check the server’s certificate.
- Full (strict) encrypts both and checks the certificate is valid.
Aim for Full (strict). Your server needs a valid certificate for that, either from your host (usually a free Let’s Encrypt certificate) or a free Cloudflare Origin Certificate installed on the server.
Always Use HTTPS: on
Under SSL/TLS → Edge Certificates. Redirects every HTTP request to HTTPS at Cloudflare, before it reaches your server.
Automatic HTTPS Rewrites: on
Fixes “mixed content”, where an HTTPS page loads an image or script over HTTP, by rewriting the links where it can.
Minimum TLS version: 1.2
Older versions are outdated and insecure. Setting 1.2 as the minimum is safe for virtually all visitors.
HSTS: only when you’re sure
HSTS tells browsers to only ever use HTTPS for your domain, for months at a time. It’s good security, but it’s hard to undo. If your SSL breaks with HSTS on, visitors can’t click past the warning. Turn it on only once HTTPS has worked reliably for a while, and start with a short max-age.
Speed: the useful settings
Caching level and browser cache TTL
Under Caching → Configuration, “Standard” caching level is fine. Browser Cache TTL decides how long visitors’ browsers keep static files; “Respect Existing Headers” is a sensible default if your host or caching plugin already sets them.
Remember that, by default, Cloudflare caches static files (images, CSS, JavaScript) but not your HTML pages. That’s deliberate, and safe.
Brotli compression: on
Smaller files, faster transfers. No downside I know of.
Auto Minify: try it, then test
Under Speed → Optimization, Auto Minify strips whitespace from HTML, CSS and JavaScript. Usually harmless, but if you already minify with a WordPress plugin, doing it twice gains nothing. Pick one place.
Rocket Loader: careful
Rocket Loader changes how JavaScript loads to speed up rendering. On some sites it helps. On others it breaks sliders, forms, analytics or the checkout. If you try it, test every interactive part of the site, and turn it off at the first sign of trouble.
Automatic Platform Optimization (APO) for WordPress
A paid add-on (cheap per month on the free plan) that caches your WordPress HTML pages at Cloudflare’s edge, with a plugin to clear the cache when you publish. For content-heavy WordPress sites with visitors around the world, it can make a real difference to load times. For a WooCommerce shop, check it’s bypassing cart and checkout properly before relying on it.
Don’t cache what shouldn’t be cached
If you add rules to cache more aggressively, make sure you bypass the cache for:
/wp-admin/and/wp-login.php- Cart, checkout and account pages
- Anything personalised to the logged-in user
Caching a cart page is how one visitor ends up seeing another’s basket. Not a great look.
Security: the useful settings
Security level
Under Security → Settings, “Medium” is a reasonable default. You rarely need to change it.
Bot Fight Mode: test it
It challenges traffic that looks automated. It can cut down junk traffic, but it can also get in the way of legitimate services: uptime monitors, payment callbacks, some integrations. If you switch it on, check that everything that talks to your site still can.
Protect the login page
WordPress login pages get hammered by bots guessing passwords. A custom WAF rule that challenges requests to /wp-login.php and /xmlrpc.php (or blocks xmlrpc.php if nothing on the site uses it) cuts a lot of that noise. The free plan includes a small number of custom rules, and this is a good use for one.
Under Attack Mode: emergencies only
It shows every visitor a check page before letting them through. Useful during an actual attack. Terrible as a permanent setting.
A note for Shopify stores
Shopify handles SSL, hosting and its own content delivery, and its own setup guidance says to point your domain’s records at Shopify directly. If you manage DNS in Cloudflare for a Shopify store, follow Shopify’s instructions and keep the Shopify records as DNS only (the grey cloud), not proxied. Proxying a Shopify store through Cloudflare is a common source of SSL and redirect errors.
What I’d leave alone
Unless there’s a clear reason: page-level features you don’t understand yet, aggressive “cache everything” rules on a dynamic site, and anything that rewrites your pages without you testing the result. Small, tested changes beat a dashboard full of toggles.
Related reading
- DNS, SSL and Cloudflare: what site owners should know
- WordPress security basics every site owner should know
- Page speed on a budget: what to fix first
If you use Cloudflare, open the SSL/TLS page now and check the encryption mode. If it says Flexible, that’s your first fix.