Skip to content

Phases list

The following tables list the phases of Cloudflare products powered by the Ruleset Engine, in the order those phases are executed. Some products such as the Cloudflare Web Application Firewall have more than one associated phase.

Network layer

Network-layer phases apply to packets received on the Cloudflare global network.

Phase nameUsed in product/feature
ddos_l4Network-layer DDoS Attack Protection
magic_transitMagic Firewall
mt_managedMagic Firewall managed rulesets
mt_ids_managedMagic Firewall Intrusion Detection System (IDS)

Application layer

Application-layer phases apply to requests received on the Cloudflare global network.

Request phases

The phases execute in the order they appear in the table.

Phase nameUsed in product/feature
http_request_sanitizeURL normalization
http_request_dynamic_redirectSingle Redirects
http_request_transformRewrite URL Rules
N/A (internal phase)Waiting Room Rules
http_config_settingsConfiguration Rules
http_request_originOrigin Rules
ddos_l7*HTTP DDoS Attack Protection
http_request_api_gatewayAPI Gateway
http_request_firewall_customCustom rules (Web Application Firewall)
http_ratelimitRate limiting rules (WAF)
N/A (internal phase)API Shield
http_request_firewall_managedWAF Managed Rules
http_request_sbfmSuper Bot Fight Mode
N/A (internal phase)Cloudflare Access
http_request_redirectBulk Redirects
N/A (internal phase)Managed Transforms
http_request_late_transformHTTP Request Header Modification Rules
http_request_cache_settingsCache Rules
http_request_snippetsSnippets
http_request_cloud_connectorCloud Connector

* This phase is for configuration purposes only — the corresponding rules will not be executed at this stage in the request handling process.

Response phases

The phases execute in the order they appear in the table.

Phase nameUsed in product/feature
http_custom_errorsCustom Error Responses
N/A (internal phase)Managed Transforms
http_response_headers_transformHTTP Response Header Modification Rules
http_ratelimitRate limiting rules (when they use response information)
http_response_compressionCompression Rules
http_response_firewall_managedCloudflare Sensitive Data Detection (Data Loss Prevention)
http_log_custom_fieldsLogpush custom fields