# Create a Safeguard

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'**

   {% figure %}
   ![Create Safeguard on a rule](https://docs.statsig.com/images/safeguards/create-safeguard.png)
   {% /figure %}

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).

   {% figure %}
   ![Select an action](https://docs.statsig.com/images/safeguards/choose-safeguard-action.png)
   {% /figure %}

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 |

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

   {% callout type="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.
   {% /callout %}

6. Select one or more alerts to monitor:
   - Rollout alerts - For feature-specific regression detection
   - Topline alerts - For system-wide health monitoring

   {% figure %}
   ![Add alerts for your Safeguard](https://docs.statsig.com/images/safeguards/add-alerts.png)
   {% /figure %}

7. Click **Save**
