AI Vibing

Turn On Cloudflare Rate Limits, Bot Rules and WAF Rules for Your Vibe-Coded App

Turn On Cloudflare Rate Limits, Bot Rules and WAF Rules for Your Vibe-Coded App

Do this first

Map the routes you need to protect

Write down your authentication endpoints (for example /login, /signup, /reset-password, or /api/auth/*) and your high value pages (pricing, checkout, API docs). Reel Playbooks addition: if you build with an AI assistant, ask it to list every auth and form route in your codebase so you do not miss one. A prompt you can use: My site is proxied through Cloudflare on the [Free/Pro/Business] plan. My login, signup and password reset routes are [paths]. My high value pages are [pricing, checkout, API docs paths]. List the exact Cloudflare dashboard settings for (1) rate limiting rules on the auth routes, (2) bot protection for the high value pages, and (3) WAF custom rules and managed rulesets for SQL injection, XSS and path traversal. Only use features available on my plan, and tell me what could block real users or my own API clients.

See all 6 steps

Summary

Putting Cloudflare in front of your app is not the same as protecting it. If nobody configured the rules, credential stuffing bots, scrapers and vulnerability scanners pass straight through to your origin, using your compute and raising your bill. This playbook covers the three edge settings from the reel: rate limiting on authentication routes, bot protection on high value pages, and WAF rules for common attack patterns, plus what each Cloudflare plan actually lets you do.

Skill level
Intermediate
Time to implement
45 min
Cost
Free
Platform
Instagram
Tools
Cloudflare
Outcomes
Free to do
Last verified
Nov 16, 2026

Set upWhat you need

  • A domain proxied through Cloudflare (orange cloud on) and access to its dashboard

  • A list of your auth routes (login, signup, password reset) and high value pages (pricing, checkout, API docs)

  • Reel Playbooks addition: the Free plan covers a basic version of every step; Pro or higher unlocks more rules, longer rate limit windows and the managed OWASP ruleset

  • About 45 minutes, plus a few days of watching Security Events

ToolsCloudflare

Do thisStep by step

0 of 6 steps done
  1. Map the routes you need to protect

    Write down your authentication endpoints (for example /login, /signup, /reset-password, or /api/auth/*) and your high value pages (pricing, checkout, API docs). Reel Playbooks addition: if you build with an AI assistant, ask it to list every auth and form route in your codebase so you do not miss one. A prompt you can use: My site is proxied through Cloudflare on the [Free/Pro/Business] plan. My login, signup and password reset routes are [paths]. My high value pages are [pricing, checkout, API docs paths]. List the exact Cloudflare dashboard settings for (1) rate limiting rules on the auth routes, (2) bot protection for the high value pages, and (3) WAF custom rules and managed rulesets for SQL injection, XSS and path traversal. Only use features available on my plan, and tell me what could block real users or my own API clients.

  2. Add rate limiting rules on authentication routes

    In the Cloudflare dashboard, go to Security, then WAF, then Rate limiting rules, and create a rule that matches your auth paths and blocks or challenges any IP that exceeds a set number of requests per period. The point is to stop the flood at the edge, before it reaches your server. Reel Playbooks addition: on the Free plan you get 1 rule that can match on URI Path only, counts by IP, and uses a 10 second period and 10 second block, so put all auth paths in that one rule (for example http.request.uri.path in {"/login" "/signup" "/reset-password"}) and start with something like 10 requests per 10 seconds. Pro allows up to 2 rules and periods up to 1 minute; Business allows 5. See the rate limiting rules docs.

  3. Turn on bot protection for high value pages

    Have Cloudflare identify automated traffic by behavior and fingerprint and challenge or block it before it touches your origin. Reel Playbooks addition: the reel says "bot management", but full Bot Management is an Enterprise product. On Free, turn on Bot Fight Mode under Security, then Bots; it applies to the whole domain and cannot be limited to certain pages or skipped with rules, so test your API and mobile clients after enabling it. On Pro and Business, Super Bot Fight Mode lets you choose actions for definitely automated traffic and protect static resources. To target only pricing or checkout pages, you can also add a WAF custom rule with a Managed Challenge on those paths.

  4. Deploy WAF rules for known attack patterns

    Block SQL injection attempts in query strings, XSS payloads in form fields and path traversal in URLs at the edge, aiming at the OWASP Top 10 patterns. Reel Playbooks addition: start with the managed rulesets under Security, then WAF, then Managed rules: the Cloudflare Free Managed Ruleset is available on every plan, while the broader Cloudflare Managed Ruleset and the OWASP Core Ruleset need Pro or higher (managed rules docs). Then add custom rules for anything specific to your app, for example blocking http.request.uri contains "../". Free allows 5 custom rules and Pro allows 20; regex matching needs Business or higher.

  5. Lock your origin so attackers cannot go around Cloudflare

    Reel Playbooks addition: edge rules only help if traffic actually goes through Cloudflare. Configure your server or host firewall to accept web traffic only from Cloudflare IP ranges, or use Authenticated Origin Pulls, so bots cannot hit your origin IP directly.

  6. Watch Security Events and tune

    Reel Playbooks addition: for the next few days, check Security, then Events, to see what each rule blocks or challenges. Loosen any rule that catches real users, your own monitoring, payment webhooks or API clients, and tighten limits that never trigger.

Heads upCommon mistakes & tips

  • Edge, not app. Blocking at Cloudflare stops bad requests before they cost you compute; your app should still validate input and use parameterized queries as a second layer.

  • Reel Playbooks addition: Cloudflare notes that rate limiting is not exact; some requests over the limit can still reach your origin for a few seconds, and rate limiting verified bots like search crawlers can hurt SEO, so do not apply strict limits to your whole site.

  • Reel Playbooks addition: many users behind one office or mobile carrier IP can share a limit, so prefer Managed Challenge over Block on signup and login if you see false positives.

  • Reel Playbooks addition: Bot Fight Mode can challenge legitimate automation such as webhooks, uptime checks and mobile app API calls; if that happens, move to targeted custom rules or a paid plan.

  • Reel Playbooks addition: the reel's "14,000 requests last night" and "200 requests per minute" figures are illustrative examples, not measured data; check your own Cloudflare analytics for real numbers.

  • Reel Playbooks addition: when an AI assistant configures Cloudflare for you through the API, give it a token scoped only to the zone and permissions it needs, and review every rule before it goes live.

Quick answersCommon questions

What is Turn On Cloudflare Rate Limits, Bot Rules and WAF Rules for Your Vibe-Coded App in short?

Putting Cloudflare in front of your app is not the same as protecting it. If nobody configured the rules, credential stuffing bots, scrapers and vulnerability scanners pass straight through to your origin, using your compute and raising your bill. This playbook covers the three edge settings from the reel: rate limiting on authentication routes, bot protection on high value pages, and WAF rules for common attack patterns, plus what each Cloudflare plan actually lets you do.

What do I need before starting?
  • A domain proxied through Cloudflare (orange cloud on) and access to its dashboard

  • A list of your auth routes (login, signup, password reset) and high value pages (pricing, checkout, API docs)

  • Reel Playbooks addition: the Free plan covers a basic version of every step; Pro or higher unlocks more rules, longer rate limit windows and the managed OWASP ruleset

  • About 45 minutes, plus a few days of watching Security Events

How many steps does it take?
6 steps:
  1. Map the routes you need to protect

  2. Add rate limiting rules on authentication routes

  3. Turn on bot protection for high value pages

  4. Deploy WAF rules for known attack patterns

  5. Lock your origin so attackers cannot go around Cloudflare

  6. Watch Security Events and tune

Who created this method?

Matt Murphy. Original strategy on Instagram.

Watch the original video on Instagram

MM

Matt Murphy

@mattmurphyaiIG

Original strategy by Matt Murphy. Watch the original on Instagram.

MeasureHow to know it worked

Security Events shows your rate limiting, bot and WAF rules blocking or challenging requests, repeated failed logins from single IPs drop off in your app logs, origin requests and compute usage go down, and real users can still sign in and check out normally.

ProvenanceSource & adaptation notes

Original

The reel and caption describe login endpoints getting thousands of bot requests (credential stuffing, scrapers on pricing pages, automated scanners) that pass through Cloudflare because the rules were never configured. The three fixes: rate limiting rules on login, registration and password reset per IP per minute at the edge; bot management rules on pricing, checkout and API docs pages; and custom WAF rules blocking SQL injection, XSS and path traversal to cover OWASP Top 10 patterns. Closing line: you are paying for a wall, configure it as a wall.

Reel Playbooks additions

Reel Playbooks additions: the plan limits for each feature (Free vs Pro vs Business vs Enterprise), the correction that full Bot Management is Enterprise while Bot Fight Mode is the free option, managed rulesets, the example expressions, the AI prompt, origin lockdown, Security Events tuning, the false positive and SEO cautions, API token scoping, and the flag on the illustrative request counts.

AttributionCredit

Original tip by Matt Murphy (@mattmurphyai) on Instagram (watch the original reel).

Adapted from Matt Murphy's video; steps expanded by Reel Playbooks.

Watch the original video

Reel Playbooks credits and links to the original creator. See For creators to request changes or removal.