Create a rule
Last updated Apr 16, 2026
Create an Advanced DNS Protection rule
- In the Cloudflare dashboard, go to the L3/4 DDoS protection page. Go to DDoS Managed Rules ↗
- Go to Advanced Protection > Advanced DNS Protection.
- Select Create Advanced DNS Protection rule.
- In Mode, select a mode for the rule.
- Under Set scope, select a scope to determine the range of packets that will be affected by the rule.
- Under Sensitivity, define the burst sensitivity, rate sensitivity, and profile sensitivity to determine when to initiate mitigation. 9. Select Deploy.
Create an Advanced TCP Protection rule
To create a SYN flood rule or an out-of-state TCP rule:
- In the Cloudflare dashboard, go to the L3/4 DDoS protection page. Go to DDoS Managed Rules ↗
- Go to Advanced Protection > Advanced TCP Protection.
- Depending on the rule you are creating, do one of the following:
- Under SYN Flood Protection, select Create SYN flood rule.
- Under Out-of-state TCP Protection, select Create out-of-state TCP rule.
- In Mode, select a mode for the rule.
- Under Set scope, select a scope for the rule. If you choose to apply the rule to a subset of incoming packets, select a region or a data center.
- Under Sensitivity, define the burst sensitivity and rate sensitivity of the rule (by default, Medium). The sensitivity levels are based on the initially configured thresholds for your specific case.
- Select Deploy.
Note
Filters take precedence over rules. For details on how the execution mode is determined, refer to Determining the execution mode.
Create a Programmable Flow Protection rule
To create a Programmable Flow Protection rule:
- In the Cloudflare dashboard, go to the L3/4 DDoS protection page. Go to DDoS Managed Rules ↗
- Go to Advanced Protection > Programmable Flow Protection.
- In General Settings, select a program. The chosen program must have a status of
success, indicating it has successfully compiled and passed verification. This field is required. - In General Settings, select a mode for the rule. This field is required.
- Under Set scope, optionally select a scope for the rule. If you choose to apply the rule to a subset of incoming packets, select a region or a data center. The default scope setting is global.
- Under Set scope, optionally select a packet filter expression. If you choose to apply a rule to a subset of incoming packets, select the IP and UDP characteristics to filter on. The default setting applies a rule to all UDP packets.
- Select Deploy.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/ddos-protection/advanced-ddos-systems/how-to/create-rule/#page","headline":"Create a rule","description":"Create an Advanced DDoS Protection rule for TCP, DNS, or flow-based mitigation.","url":"https://developers.cloudflare.com/ddos-protection/advanced-ddos-systems/how-to/create-rule/","inLanguage":"en","image":"https://developers.cloudflare.com/ddos-protection/advanced-ddos-systems/how-to/create-rule/og.png?v=91dd576da03f876a","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: Exclude a prefix or prefix subset from Advanced DDoS Protection monitoring. title: Exclude a prefix image: https://developers.cloudflare.com/ddos-protection/advanced-ddos-systems/how-to/exclude-prefix/og.png?v=5905699c6d7e1ada
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/ddos-protection/llms.txt
Use this file to discover all available pages before exploring further.
Docs