> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/feature-management-experimentation/use-fme/feature-management/targeting/target-segments.md).

# Target segments

Learn how to use segments to target feature flags, including Standard, Large, and Rule-based segments.

Once you create a feature flag, you can [create feature flag targeting rules](/feature-management-experimentation/use-fme/feature-management/setup/define-feature-flag-treatments-and-targeting.md#setting-up-targeting) that target individual user IDs (or user keys), or use segments to target groups of users.

[Segments](/feature-management-experimentation/use-fme/feature-management/targeting/segments.md) are lists of user IDs. In a feature flag definition, you can assign treatments to one or more segments in your targeting rules. If a segment does not appear in search, it may not be [defined](/feature-management-experimentation/use-fme/feature-management/targeting/segments.md#adding-user-ids-to-a-segment) in the selected FME environment.

![](https://1473625385-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrT2RGHAjtBTaObzchfpb%2Fuploads%2Fgit-blob-b13ca0c863b27596bb7ed78866a580c15c2310d7%2Ftargeting-6.png?alt=media)

{% hint style="danger" %}
**SERVER-SIDE SDK SUPPORT**

[Server-side SDKs](/feature-management-experimentation/new-to-fme/sdks-and-customer-deployed-components/server-side-sdks.md) do not support **Large segments**. Evaluations of feature flags targeting Large segments return `control`.

If you need this capability, contact [Harness Support](/feature-management-experimentation/troubleshooting-and-resources/fme-support.md) or open a [feature request](https://ideas.harness.io/feature-request).
{% endhint %}

### Target segments in individual targeting rules <a href="#target-segments-in-individual-targeting-rules" id="target-segments-in-individual-targeting-rules"></a>

You can target segments in individual targeting rules. These rules assign a treatment to the segment. In the following example, the feature flag will serve **on** to all user IDs in the given segments.

![](https://1473625385-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrT2RGHAjtBTaObzchfpb%2Fuploads%2Fgit-blob-5cfe8b8241f4468462d19654e3526a9c63f4ebf0%2Ftarget-segments-individual-targets.png?alt=media)

After you select a segment, you can see the segment type indicated by the input pill icon in the To segments field.

![](https://1473625385-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrT2RGHAjtBTaObzchfpb%2Fuploads%2Fgit-blob-857ade77b3c19f9bf73e682814cce30c792e5410%2Ftarget-segments-to-segments-input.png?alt=media)

### Target segments in attribute-based targeting rules <a href="#target-segments-in-attribute-based-targeting-rules" id="target-segments-in-attribute-based-targeting-rules"></a>

You can also target Standard, Large, and Rule-based segments in attribute based targeting rules. The following example is equivalent to the individual targeting rule shown above.

![](https://1473625385-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrT2RGHAjtBTaObzchfpb%2Fuploads%2Fgit-blob-12941735c6fb4c6e93842b62d0354ca1ff876980%2Ftarget-segments-attribute-based-targeting.png?alt=media)

You can also use ***percentage distribution*** to randomly distribute treatments among the user IDs in a segment, as shown below.

![](https://1473625385-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrT2RGHAjtBTaObzchfpb%2Fuploads%2Fgit-blob-3545fff4e908367ef736eeb97b2f2030bedf2634%2Ftarget-segments-percentage-distribution.png?alt=media)

See [Targeting rules](/feature-management-experimentation/use-fme/feature-management/setup/define-feature-flag-treatments-and-targeting.md#targeting-rules) for more information on feature flag targeting, percentage distribution, and rules' evaluation order.

{% @harness-feedback/feedback %}
