Many sites use Cloudflare but never switch on its security settings. Five Cloudflare free plan settings to turn on first, and how to protect the account.
- Date
- Reading
- 6 min read
- Written by
- Nick Li
- Tags
- #Risk#Engineering
Plenty of small company websites in Hong Kong sit behind Cloudflare. Usually someone set it up once, a developer or the hosting company, to get a free SSL certificate and a faster site. After that, nobody opened the dashboard again.
The free plan has more security in it than most sites use. Some of it works on its own: DDoS protection, and a free set of WAF rules against widely exploited vulnerabilities that is on by default. The rest you have to switch on. Here are the five settings we turn on first for clients. None of them costs anything.
1. Set SSL/TLS to Full (strict)
Cloudflare handles two connections: visitor to Cloudflare, and Cloudflare to your server. In Flexible mode only the first one is encrypted. Visitors see the padlock, but logins and form data travel to your server as plain HTTP. Full encrypts both but doesn't check your server's certificate. Full (strict) checks that the certificate is valid and matches your domain. A free Let's Encrypt certificate or a Cloudflare Origin CA certificate both work.
- Where: SSL/TLS > Overview. New sites get Automatic SSL/TLS, which picks the most secure mode it can detect, but older setups are often still on Flexible. Check yours.
- Also turn on Always Use HTTPS under SSL/TLS > Edge Certificates.
- HSTS on the same page tells browsers to use HTTPS only. Turn it on only when the whole site, subdomains included, works on HTTPS. If HTTPS breaks later, visitors can't reach the site until the max-age you set runs out, so start short.
2. Don't let anyone go around Cloudflare
Cloudflare only protects traffic that passes through it. Anyone who knows your server's real IP address can connect to it directly and skip the firewall, the bot checks and the rate limits. That IP leaks more often than people expect: a "DNS only" record such as mail, ftp or cpanel pointing at the same server, the server's address in the emails it sends, or old DNS records from before the move to Cloudflare.
- Check DNS > Records for records with a grey cloud (DNS only) that point at the same server as the website.
- Let the server accept web traffic only from Cloudflare. Cloudflare publishes its IP ranges and examples for
.htaccessandiptables. - On shared hosting you usually can't change the firewall yourself. Ask the hosting company what they support.
- If the IP has been public for years, moving to a new IP after you lock things down is the cleanest fix.
3. Turn on Bot Fight Mode
A lot of the traffic to a small website isn't people. It's scanners looking for old plugins, scrapers, and scripts trying passwords. Bot Fight Mode challenges requests that look like known bots.
- Where: Security > Settings, filter by Bot traffic, then turn on Bot fight mode.
- One catch: it can't be skipped with your own rules, and it may challenge API or mobile app traffic. If an app, a payment callback or another system calls your site, test it after switching on. If something breaks, turn it off again; exceptions need the paid Super Bot Fight Mode.
4. Put a speed limit on the login page
A login page that accepts unlimited attempts invites password guessing. The free plan includes one rate limiting rule, and the login page is the best place for it.
- Where: Security rules > Create rule > Rate limiting rules.
- On the free plan the rule matches by URL path and counts requests per IP over 10 seconds. For WordPress: when the path equals
/wp-login.phpand the same IP sends more than 5 requests in 10 seconds, block it. Use your own login path if it's different, such as/loginor/admin. - The free plan also has five custom rules. A useful one: show a Managed Challenge to anyone opening the admin area from outside the countries your team works in.
This won't stop a patient attacker by itself, but it makes fast password guessing much slower. Pair it with strong passwords and two-factor sign-in on every admin account.
5. Use Turnstile on your forms
Contact forms and sign-up pages attract spam bots. Turnstile is Cloudflare's free replacement for CAPTCHA; most visitors never see a puzzle. The free plan allows up to 20 widgets with unlimited challenges, and the site doesn't even need to be behind Cloudflare.
- Where: Turnstile in the Cloudflare dashboard. Create a widget, then add it to the form.
- Check that your server verifies the token (Cloudflare calls this Siteverify). A widget that only appears on the page, without the server checking it, stops nothing. Ask whoever built the site.
Then lock the Cloudflare account itself
All five settings live in one dashboard. Whoever can log in can switch them off, or point your domain somewhere else. As with your company email, protect the account that controls everything else:
- Two-factor sign-in with a security key: Touch ID, Windows Hello, an Android fingerprint or a hardware key, with an authenticator app as backup. It's under My Profile > Authentication. Cloudflare supports all of these.
- If several people have access, a Super Administrator can turn on 2FA Enforcement for every member. Remove people who have left.
- Turn on DNSSEC under DNS > Settings, then add the DS record at your domain registrar. It stops others from forging DNS answers for your domain.
What we suggest
| Setting | Where | Protects against |
|---|---|---|
| SSL/TLS Full (strict), Always Use HTTPS | SSL/TLS | Data read or changed between Cloudflare and your server |
| Server accepts Cloudflare only | DNS > Records, plus your server or host | Attackers going around Cloudflare |
| Bot Fight Mode | Security > Settings | Scanners and scrapers |
| Rate limit on the login page | Security rules | Password guessing |
| Turnstile on forms | Turnstile | Form spam and fake sign-ups |
| 2FA and DNSSEC | My Profile; DNS > Settings | Account takeover and forged DNS |
- Start with SSL/TLS and the account's 2FA. They take minutes and rarely break anything.
- Test after each change: open the site, log in, send a form, and try any app or payment flow.
- Do step 2 with your developer or hosting company. Done wrong, it can take the site offline.
- Check again after a redesign or a hosting move. New servers and new DNS records undo settings without anyone noticing.
Cloudflare's free plan already has the locks. Most sites just haven't turned them on.
If you'd like us to go through your Cloudflare setup with you, let's talk.
