---
title: Create a Safeguard
description: Learn how to create a Safeguard on one or multiple targeting rules within a Feature Gate to monitor regressions and automatically take action when alerts fire.
product: general
token_estimate: 491
---
# Create a Safeguard

> For AI agents: a documentation index is available at [/llms.txt](/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

A Safeguard monitors a Feature Gate's targeting rule for regressions and automatically takes an action, such as rolling back to 0%, when an alert fires. To create one on a rule, follow these steps:

1. Go to a Feature Gate's **Setup** tab
2. Pick a targeting rule for which you want to monitor regressions
3. Click the three-dot (...) menu and choose **'Safeguard Rule'**

   ![Create Safeguard on a rule](https://docs.statsig.com/images/safeguards/create-safeguard.png)
4. Choose the action to take when alerts fire:

   - **Rollback to 0%**: Assigns default value to all users.
   - **Roll out to 100%**: Assigns Pass value to all users.
   - **Pause Rollout**: Stops scheduled rollout progression (only available with an active Scheduled Rollout policy).

   ![Select an action](https://docs.statsig.com/images/safeguards/choose-safeguard-action.png)
5. (Optional) Set how long to monitor alerts for safeguarding the rule:

   | Alert type | Evaluation period | Evaluation start time |
   | --- | --- | --- |
   | Topline alert | Choose your own | Starts when you create the safeguard |
   | Rollout alert | Fixed (90 days) | Starts whenever targeting rule's pass % changes |

   ![Set evaluation period](https://docs.statsig.com/images/safeguards/evaluation-period.png)

   > **Tip:**
   >
   > **Recommended:** Monitor topline alerts for crashes, errors, latency, and similar issues _for a few days_ after a Feature Gate rollout to confirm stability. A 14-day evaluation period is a good starting point.
6. Select one or more alerts to monitor:

   - Rollout alerts - For feature-specific regression detection
   - Topline alerts - For system-wide health monitoring

   ![Add alerts for your Safeguard](https://docs.statsig.com/images/safeguards/add-alerts.png)
7. Click **Save**

