Create custom rules
Before you begin
- Understand whether Cloudflare proxies your traffic: Depending on the nature of your traffic, you may have access to more or less fields for your load balancing rules. For more details, see .
1. Create a new Load Balancing rule
Log in to your Cloudflare Account and select a domain.
Select Traffic > Load Balancing.
From the Load Balancer workflow, select Custom Rules.
Select Create Custom Rule.
2. Build a Load Balancing expression
This example routes certain content requests from our webserver to a different origin pool.When incoming requests match:
|URI Query String||contains|
Enter the value to match. When the field is an ordered list, Value is a drop-down list. Otherwise, Value is a text input.
[Optional] To create a compound expression using logical operators, select And or Or.
[Optional] Select Add another override.
3. Save a Load Balancing rule and configuration
After you create your rule, select Save and Deploy or Save as Draft.
Select Next and review your changes.