Update custom rules for customers or partners

Last updated Apr 16, 2026 You may want to adjust your custom rules to increase access by customers or partners.

Potential examples include:

  • Removing rate limiting for an API
  • Sharing brand assets and marketing materials

Caution

The example custom rules in this page can bypass Cloudflare's security features and are generally not recommended. Use with caution.

Use ASN in custom rules

If a customer or partner is large enough, you could set up a custom rule based on an autonomous system number (ASN) ↗︎.

Allow traffic by ASN

This example uses:

Example custom rule:

  • When incoming requests match:
Field Operator Value Logic
AS Num equals 64496 And
Bot Score greater than 30

If you are using the expression editor:
(ip.src.asnum eq 64496 and cf.bot_management.score gt 30) - Then take action: Skip: - All remaining custom rules

Note

Access to Bot Management requires a Cloudflare Enterprise plan with Bot Management.

Adjust rules by ASN

This example custom rule uses:

If a request meets these criteria, the custom rule will skip User Agent Blocking rules.

  • When incoming requests match:
Field Operator Value Logic
AS Num equals 64496 And
Bot Score greater than 50

If you are using the expression editor:
(ip.src.asnum eq 64496 and cf.bot_management.score gt 50) - Then take action: Skip: - User Agent Blocking

Use IP addresses in custom rules

For smaller organizations, you could set up custom rules based on IP addresses.

Allow traffic by IP address

This example:

  • Specifies the source IP address and the host.
  • Uses the cf.bot_management.score field to ensure requests are not high-risk traffic.

Example custom rule:

  • When incoming requests match:
Field Operator Value Logic
IP Source Address equals 203.0.113.1 And
Hostname equals example.com And
Bot Score greater than 30

If you are using the expression editor:
(ip.src eq 203.0.113.1 and http.host eq "example.com" and cf.bot_management.score gt 30) - Then take action: Skip: - All remaining custom rules

Adjust rules by IP address

This example custom rule specifies the source IP address and the host.

If a request meets these criteria, the custom rule will skip rate limiting rules.

  • When incoming requests match:
Field Operator Value Logic
IP Source Address equals 203.0.113.1 And
Hostname equals example.com

If you are using the expression editor:
(ip.src eq 203.0.113.1 and http.host eq "example.com") - Then take action: Skip: - All remaining custom rules

Was this helpful?

YesNo

On this page

Update custom rules for customers or par - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/waf/custom-rules/use-cases/update-rules-customers-partners/#page","headline":"Update custom rules for customers or partners","description":"Manage custom rules for customer and partner traffic.","url":"https://developers.cloudflare.com/waf/custom-rules/use-cases/update-rules-customers-partners/","inLanguage":"en","image":"https://developers.cloudflare.com/waf/custom-rules/use-cases/update-rules-customers-partners/og.png?v=76fcae3eba975428","dateModified":"2026-04-16","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: Define rate limits for requests matching an expression and the action when limits are reached. title: Rate limiting rules image: https://developers.cloudflare.com/waf/rate-limiting-rules/og.png?v=55b209a0deb92182


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/waf/llms.txt
Use this file to discover all available pages before exploring further.