---
title: How it works · Cloudflare Rules docs
description: "Cloudflare Snippets are executed based on rules defined within
  your zone. Here is how the process works:"
lastUpdated: 2025-05-09T10:24:05.000Z
chatbotDeprioritize: false
source_url:
  html: https://developers.cloudflare.com/rules/snippets/how-it-works/
  md: https://developers.cloudflare.com/rules/snippets/how-it-works/index.md
---

Cloudflare Snippets are executed based on rules defined within your zone. Here is how the process works:

## Request evaluation

For each incoming request, Cloudflare evaluates the expression of every Snippet Rule defined in the zone. The evaluation checks for a match based on various request properties (such as bot score, WAF attack score, country of origin, and cookies).

## Snippet execution

If a Snippet Rule's expression evaluates to true, the corresponding Snippet's code is scheduled for execution. Multiple Snippets may run on the same request if their respective expressions match. In such cases, each Snippet receives the modified request from the previous Snippet and applies further modifications.

## Execution order

After evaluating all Snippet Rules, Cloudflare executes the code of all scheduled Snippets in the order their rules matched.

For more information, refer to our [blog post](https://blog.cloudflare.com/cloudflare-snippets-alpha).
