No results for ""
EXPAND ALL
  • Home
  • API docs

The default rule

Read time: 1 minute
Last edited: Oct 30, 2024

Overview

This topic explains how to set the default rule for a flag. LaunchDarkly defines a final default rule, sometimes called the "fallthrough" rule, for any contexts that don't match any of the previous targeting rules on the flag.

The default rule is different from the fallback value, which is the value that contexts receive if your application can't connect to LaunchDarkly. To learn more, read Fallback value.

The default rule is also different from the off variation, which is the value LaunchDarkly serves when the flag is off. To learn more, read The off variation.

Set the default rule

To access the targeting page:

  1. In the flags dashboard, scroll or search to find the flag you want.
  2. Click the flag's name to open the flag targeting page.
  3. In the "Default rule" section, click Edit to configure the default rule to serve a specific variation, or apply a percentage rollout to any remaining contexts.

Here is an image of a default rule:

A flag's default rule.
A flag's default rule.

In this example, all contexts that have not been targeted by any other rules will receive false.