[ Web Proxy ]
URL:
Viewing: https://developers.cloudflare.com/waf/tools/ip-access-rules/create/ [Back]  [Original]

Create an IP access rule Cloudflare Web Application Firewall (WAF) docsSkip to content
SearchCtrlKLog in
  1. Home
  2. /WAF
  3. /
    Additional tools
  4. /IP Access rules
  5. /Create a rule

Create an IP access rule

Last updated Aug 3, 2026Copy as MarkdownView as MarkdownAgent setup

Recommendation: Use custom rules instead

Cloudflare recommends that you create custom rules instead of IP Access rules to perform IP-based or geography-based blocking (geoblocking).

Caution

For Spectrum applications configured with the non-HTTP/HTTPS application type, IP Access rules are the only supported mechanism for filtering traffic by IP address, IP range, country, or ASN. To use them, enable IP Access rules in your Spectrum app configuration.

Note

The IP access rules option appears only if you have configured at least one IP access rule.

  1. In the Cloudflare dashboard, go to the Security rules page.

    Go to Security rules ↗
  2. Select Create rule > IP access rules.

  3. Enter the following rule details:

    1. For IP, IP range, country name, or ASN, enter an IP address, IP range, country code/name, or Autonomous System Number (ASN). For details, refer to IP Access rules parameters.
    2. For Action, select an action.
    3. For Zone, select whether the rule applies to the current website only or to all websites in the account.
    4. (Optional) Enter a note for the rule (for example, Payment Gateway).
  4. Select Create.

Use the Cloudflare API to programmatically create IP access rules. For more information, refer to Create an IP Access Rule.

PreviousOverviewNextParameters

Was this helpful?

YesNo
Edit pageReport issue
[]

Web Proxy Viewer  |  New URL  |  Original Page