Rate Limiting (previous version)
Last updated Jun 5, 2026 Cloudflare Rate Limiting automatically identifies and mitigates excessive request rates for specific URLs or for an entire domain.
Caution
The information in this page refers to the previous version of rate limiting rules, which was billed based on usage and is no longer available.
Cloudflare has upgraded all rate limiting rules to the new version of rate limiting rules. For more information on what changed in the new version, refer to Rate limiting (previous version) upgrade.
Were you blocked from accessing a website?
If you are a visitor who received an error while trying to access a website, please refer to the error 1015 documentation.
Request rates are calculated locally for individual Cloudflare data centers. The most common uses for Rate Limiting are:
- Protect against DDoS attacks ↗︎
- Protect against Brute-force attack ↗︎
- Limit access to forum searches, API calls, or resources that involve database-intensive operations at your origin
Once an individual IPv4 address or IPv6 /64 IP range exceeds a rule threshold, further requests to the origin server are blocked with an HTTP 429 response status code. The response includes a Retry-After header to indicate when the client can resume sending requests.
Note
Are you trying to enable Rate Limiting? Enable Rate Limiting ↗︎.
Rate limiting and SEO
Cached resources and known Search Engine crawlers are exempted from your rate limiting rules (previous version only). Therefore, they do not affect your website's SEO ranking.
Availability
Note
Cloudflare Rate Limiting (previous version) is an add-on service for all customer plans, available in Security > WAF > Rate limiting rules.
The number of allowed rate limiting rules depends on the domain's plan:
| Plan | Rules | Rules matching response headers | Actions | Action Duration | Request Period |
|---|---|---|---|---|---|
| Free | 1 | 1 | Block | 1 minute or 1 hour | 10 seconds or 1 minute |
| Pro | 10 | 1 | Block, Non-Interactive Challenge, Managed Challenge, Interactive Challenge, or Log | 1 minute or 1 hour | 10 seconds or 1 minute |
| Business | 15 | 10 | Block, Non-Interactive Challenge, Managed Challenge, Interactive Challenge, or Log | 1 minute, 1 hour, or 24 hours | 10 seconds, 1 minute, or 10 minutes |
| Enterprise | 100 | 10 | Block, Non-Interactive Challenge, Managed Challenge, Interactive Challenge, or Log | Any duration entered between 10 seconds and 86,400 seconds (24 hours) | Any value entered between 10 seconds and 3,600 seconds (1 hour) |
Cloudflare Rate Limiting supports multiple levels of configuration control depending on the domain’s Cloudflare plan. The table below maps out what you can do based on your plan:
| Order | Task | Available in |
|---|---|---|
| 1 | Configure a basic rate limiting rule | All plans |
| 2 | Configure Advanced Criteria | Business and Enterprise plans |
| 3 | Configure Advanced Response | Business and Enterprise plans |
| 4 | Configure the Bypass option | Enterprise plan |
Components of a rate limiting rule
A rate limiting rule consists of three distinct components:
Request matching criteria
Incoming requests are matched based on request path, request scheme, request method, and (optionally) origin response code.
Request path
For example:
http://example.com/examplehttp://example.com/example/*
The request path is case insensitive. Patterns cannot match content after query strings (?) or anchors (#). An asterisk (*) matches any sequence of characters, including an empty sequence. For example:
*.example.com/*matches any path on any subdomain ofexample.com.*example.com/example.htmlmatchesexample.htmlonexample.comor any subdomain ofexample.com.*matches any page on your site.
A request for example.com/path is not the same as example.com/path/. The only exception to this rule is the homepage: example.com matches example.com/.
Request scheme
HTTP or HTTPS. If none is specified, both are matched, and the rule will list __ALL__.
Request method
POST or GET. If none is specified, all methods are matched, and the rule will list __ALL__.
(Optional) Origin response code
For example, match a rate limiting rule only when the origin server returns an HTTP 401 or 403 status code. A triggered rule matching the response code criteria blocks subsequent requests from that client regardless of origin response code.
Rate matching criteria
A rule can match on the number and time period of all requests coming from the same client.
Number of requests
Specify a minimum of two requests. For single request blocking, make the path unavailable — for example, configure your origin server to return an HTTP 403 status code.
Request period
A rule triggers once a client’s requests exceed the threshold for the specified duration.
Rule mitigation
Rule mitigations consist of mitigation action and ban duration.
Mitigation action
Rate limit actions are based on the domain plan as mentioned in Availability:
- Block: Cloudflare issues an
HTTP 429error when the threshold is exceeded. - Non-Interactive Challenge: Visitor must pass a Cloudflare non-interactive challenge. If passed, Cloudflare allows the request.
- Managed Challenge: Visitor must pass a challenge dynamically chosen by Cloudflare based on the characteristics of the request. If passed, Cloudflare allows the request.
- Interactive Challenge: Visitor must pass an Interactive Challenge. If passed, Cloudflare allows the request.
- Log: Requests are logged in Cloudflare Logs. This helps test rules before applying to production.
For more information on challenge actions, refer to Challenges.
Ban duration
Setting a timeout shorter than the threshold causes the API to automatically increase the timeout to equal the threshold.
Visitors hitting a rate limit receive a default HTML page if a custom error page is not specified. In addition, Business and Enterprise customers can specify a response in the rule itself. Refer to Configure Advanced Response for details.
Identify rate-limit thresholds
To identify a general threshold for Cloudflare Rate Limiting, divide 24 hours of uncached website requests by the unique visitors for the same 24 hours. Then, divide by the estimated average minutes of a visit. Finally, multiply by 4 (or larger) to establish an estimated threshold per minute for your website. A value higher than 4 is fine since most attacks are an order of magnitude above typical traffic rates.
To identify URL rate limits for specific URLs, use 24 hours of uncached requests and unique visitors for the specific URL. Adjust thresholds based on user reports and your own monitoring.
Task 1: Configure a basic rate limiting rule
The following sections cover two common types of rate limiting rules.
Enable Protect your login
Rate Limiting features a one-click Protect your login tool that creates a rule to block the client for 15 minutes when sending more than 5 POST requests within 5 minutes. This is sufficient to block most brute-force attempts.
- Log in to the Cloudflare dashboard ↗︎, and select your account and domain.
- Go to Security > WAF > Rate limiting rules.
- Under Rate Limiting, select Protect your login.
- Enter Rule Name and Enter your login URL in the Protect your login dialog that appears.
- Select Save.
- The Rule Name appears in your Rate Limiting rules list.
Create a custom rate limiting rule
- Log in to the Cloudflare dashboard ↗︎, and select your account and domain.
- Go to Security > WAF > Rate limiting rules.
- Select Create rate limiting rule. A dialog opens where you specify the details of your new rule.

- Enter a descriptive name for the rule in Rule Name.
- For If Traffic Matching the URL, select an HTTP scheme from the dropdown and enter a URL.
- In from the same IP address exceeds, enter an integer greater than 1 to represent the number of requests in a sampling period.
- For requests per, select the sampling period (the period during which requests are counted). Domains on Enterprise plans can enter manually any duration between 10 seconds and 3,600 seconds (one hour).
- For Then, pick one of the available actions based on your plan. Review the Rule mitigation section for details.
- If you selected Block or Log, for matching traffic from that visitor for, select how long to apply the option once a threshold has been triggered. Domains on Enterprise plans can enter any value between 10 seconds and 86,400 seconds (24 hours).
- To activate your new rule, select Save and Deploy.
