Sign inSign up
Product docsGuidesSDKsIntegrationsAPI docsTutorialsFlagship Blog
Product docsGuidesSDKsIntegrationsAPI docsTutorialsFlagship Blog
  • Getting started
    • Overview
    • Launch Insights
    • LaunchDarkly architecture
    • LaunchDarkly vocabulary
  • Feature flags and AI Configs
    • Create flags
    • Target with flags
    • Flag templates
    • Manage flags
    • Code references
    • AI Configs
    • Contexts
    • Segments
  • Releases
    • Releasing features with LaunchDarkly
    • Release policies
    • Percentage rollouts
    • Progressive rollouts
    • Guarded rollouts
    • Feature monitoring
    • Release pipelines
    • Engineering insights
    • Release management tools
    • Applications and app versions
    • Change history
  • Observability
    • Observability
    • Session replay
    • Error monitoring
    • Logs
    • Traces
    • LLM observability
    • Alerts
    • Dashboards
    • Search specification
    • Monitoring settings
  • Product analytics
    • Product analytics
    • Setting up product analytics
    • Using product analytics charts
  • Experimentation
    • Experimentation
    • Creating experiments
    • Managing experiments
    • Analyzing experiments
    • Experimentation and metric events
    • Multi-armed bandits
    • Holdouts
  • Metrics
    • Metrics
    • Metric groups
    • Autogenerated metrics
    • Metric impact
    • Metric events
  • Warehouse native
    • Warehouse native Experimentation
    • Warehouse native metrics
    • Creating warehouse native experiments
  • Infrastructure
    • Connect apps and services to LaunchDarkly
    • LaunchDarkly in China and Pakistan
    • LaunchDarkly in the European Union (EU)
    • LaunchDarkly in federal environments
    • Public IP list
  • Your account
    • Projects
    • Views
    • Environments
    • Tags
    • Teams
    • Members
    • Roles
    • Account security
    • Billing and usage
    • Changelog
Sign inSign up
LogoLogo
On this page
  • Overview
  • Default rules for new flags
  • Update the default rule
Feature flags and AI ConfigsManage flags

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 can be a single variation, a guarded rollout, a progressive rollout, or a percentage rollout.

Here is an image of a default rule:

A flag's default rule.

A flag's default rule.

You can set the default rule to a specific variation when you create a new flag. If needed, you can later update the default rule to a different variation or to a rollout.

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.

Default rules for new flags

Here is how LaunchDarkly sets the default rule for new flags:

  • When you create a new boolean flag, the default variation when the flag is on is “true.” You can update this to “false” as part of the flag creation process. You can also change this default to “false” for all new flags using flag templates.
  • When you create a new multivariate flag, the default variation when the flag is on is the first variation on the flag. You can update this to any other variation as part of the flag creation process.

You can later update the default rule to a different variation or to a rollout.

Update the default rule

To update a flag’s default rule:

  1. In the flags dashboard, scroll or search to find the flag you want.
  2. Click the flag’s name to open the flag’s Targeting tab.
  3. In the “Default rule” section, click Edit to configure the default rule to serve a specific variation, or serve a rollout.
    • If the flag is off and the rules are hidden, click View targeting rules.

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

You can also use the JSON editor

To learn how to set a default rule using JSON, read Default rule or variation.

Was this page helpful?
Previous

Flag statuses and lifecycle stages

Next
Built with
The default rule