Creating Load Balancing rules
Create a Load Balancing rule in the Cloudflare dashboard via the following:
Create a new Load Balancing rule
Log in to your Cloudflare Account and click the site to manage.
In the Cloudflare dashboard, click the Traffic app, then select the Load Balancing tab.
The Edit Load Balancer page displays:
In the breadcrumb links for the Edit Load Balancer workflow, click Custom Rules.
Click Create Custom Rule.
In the Create Custom Rule dialog that appears, supply a descriptive name via the Rule name input. The example below uses "Select pool by URI path and query."
Build a Load Balancing expression
To select a comparison operator, use the Operator drop-down list. This example uses the
Enter the value to match. When the field represents an enumeration, Value is a drop-down list. Otherwise, Value is a text input. The example below matches requests where the URI path contains
[Optional] To create a compound expression using logical operators, click the And or Or button.
A new expression displays. Edit the expression. The below example uses the
andoperator and adds the requirement that the URI query string contain
Continue editing the expression as necessary.
Choose a Load Balancing action of either Respond with fixed response or Override a current Load Balancer setting when the rule matches.
[Optional] Click Add another action.
Save a Load Balancing rule and configuration
In the Create Custom Rule dialog, click Deploy. If unready to deploy your rule, click Save as draft.
The Custom Rules card displays, and your new rule is listed:
Click Next and review your changes:
When the save completes, the Load Balancing page displays.