Skip to content
10% off any project with promo code10% off with code

Cloudflare WAF for an Online Store: A Practical Guide

Contents
  1. Baseline custom rules
  2. Protecting the admin panel
  3. Rate limiting
  4. Bot Fight Mode
  5. L7 DDoS protection
Published
Reading time
~1 min
Views
143
Reader rating
9 reviews
Author
Yevhen Fostenko
Senior Backend & DevOps Engineer
Cloudflare WAF for an Online Store: A Practical Guide Article
Need help with your website?
Describe the task on Telegram — I will assess it and suggest where to start. Reply within a day.
Message on Telegram
Free consultation and estimate. I reply quickly.

Cloudflare WAF is the first line of defence for any online store. This guide covers the practical side: custom rules, rate limiting and bot protection.

Baseline custom rules

Start by blocking suspicious user agents and the regions you have no customers in. Expression rules do the job:

(http.user_agent contains "python-requests") or 
(ip.geoip.country in {"RU" "BY" "KP"})

Protecting the admin panel

Lock down /wp-admin, /admin and /administrator with Cloudflare Access or an IP allowlist. That alone removes about 90% of brute-force traffic against the admin.

Rate limiting

Apply rate limiting to the checkout and login pages: no more than 10 requests per 60 seconds from a single IP. This is what stops credential stuffing.

Bot Fight Mode

Turn on Super Bot Fight Mode — it blocks known malicious bots automatically while keeping the useful ones (Google, Bing) coming through.

L7 DDoS protection

When /wp-login or /checkout is under attack: switch to Under Attack Mode temporarily and add an expression rule that challenges all traffic to those URLs.

Tags: cloudflarewafddossecurityrate limiting
Need help with your website?
Describe the task on Telegram — I will assess it and suggest where to start. Reply within a day.
Message on Telegram
Free consultation and estimate. I reply quickly.

Related Articles

OpenCart Recovery After a Hack Article

OpenCart Recovery After a Hack

A hacked store is not only damaged reputation — it is a risk to customer data and a penalty from search engines. Recovery is not simply "remove the virus": i…

03/06/2026 176

Reader reviews

4.0
Write a review