How to save api limit exceeded from cloudflare rate limiting rules

Join Whatsapp Channel for Instant Updates

Very limited companies provides unlimited api rates on their plans. Mostly gives limited rates and after limit reached. The api requests gives error like “Api limit exceeded“. There is one solution for limit api requests free through cloudflare free as well as paid plan.

On free cloudflare plan only one rule can create for limit api requests. In this article we will discuss how to apply on website. Once it applied and requests exceeds every 10 seconds then further request will be block.

Paid plans gives custom time instead 10 seconds and more firewall rule can apply on same website. Free plan is best for normal use and only one page with 10 seconds interval.

Using cloudflare rate limiting rules option, Save paid api limit exceeded absolutely free. Api rates can save from unknown bots requests through limit rules.

It will block malicious traffic requests to access your website. Once rate exceeds cloudflare will show default rate limit response page or setup own custom html or text for it.

How to save api limit exceeded from cloudflare rate limiting rules ?

Here is the steps to save api limit exceeded errors through free cloudflare plan. Simply create rate limit rule & apply on api request page through cloudflare account.

Create rate limiting rule on cloudflare

For create rate limiting rule on cloudflare. Your website must use cloudflare nameserver and all website traffic routed. And must active on at least free plan.

1. First login to cloudflare account and select website.

2. From menu select “Security” option and then “WAF“.

3. Here navigate to “Rate limiting rules” tab and then “Create rule” button.

cloudflare rate limiting rules

4. Enter any rule name. Select URL PATH >> Equals to >> Enter your website url path where api using without domain.

5. More than one page then select “AND” or “OR“. Second action as “BLOCK” and choose duration. Next enter requests and period.

create rate limit rule on cloudflare

6. Deploy the rule and turn it on. That’s it whenever same ip requests the page more than entered requests. Then cloudflare will give error response.

Click below activity last 24 hour for check status about this rule. How much requests blocked ?

Conclusion

This is simplest way to limit api requests on php , html , java , wordpress or any language website. There is no coding or anything require. Api rates will be save from exceeded limit.

Must deploy cloudflare rate limiting rule on api used pages. Because it will block brute force attacks , bots , spiders and other malicious traffic to save api from unwanted requests.