---
title: "Visibility Rules Best Practices"
slug: "visibility-rules-best-practices-1"
updated: 2025-10-12T13:19:57Z
published: 2025-10-12T13:19:57Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.whatfix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Visibility Rules Best Practices

Expand the accordions for more details.

****Select strong elements****

While selecting an element, always capture elements that have a strong red border around them. For more information, see [Improve Element Selection using Visual Cues](/studio/docs/improve-element-selection-using-visual-cues).

![](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/image(290).png)

****Use Visual Cues****

With Visual Cues, Whatfix enables you to see the strength of the element that is being captured. This also lets you understand how well the element is identified and selected by Whatfix. Additionally, add additional information, such as [CSS selectors](/studio/docs/identify-an-elements-css-selector), to further improve the accuracy and reliability of the selection. This ensures that only the right elements are being captured and content shows up when it's supposed to. For more information, see [Improve Element Selection using Visual Cues](/studio/docs/improve-element-selection-using-visual-cues).

![](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/warning%20message%20visual%20cues.png)

****Use Contains instead of Equals****

Using the **Contains** operator rather than **Equals** provides greater flexibility and robustness in matching URLs. Here’s why:

- **Partial Matches**: **Contains** can match a segment of a URL, which is useful for targeting a range of pages under a common path or with similar structures.
- **Dynamic Content**: URLs often contain dynamic elements such as session IDs or query parameters. **Contains** can match the static part of the URL, avoiding mismatches due to these dynamic parts.
- **Complex URLs**: When URLs have multiple parameters or fragments, **contains** ensures that the rule applies even if the exact order or presence of additional parameters varies.

For more information, see [Supported Operators for Visibility and Display Rules](/studio/docs/supported-operators).

****Use URL hostname, path, hash, or parameter instead of just URL****

Using specific URL properties such as **hostname**, **path**, **hash**, and **parameters** instead of just the URL ensures more precise and flexible targeting. This precision helps avoid unintended matches and improves the relevance of your content delivery. For more information, see [URL Properties as Visibility Rules](/studio/docs/url-condition-rules).

****Add Selected Element Is before Selected Element Text****

Ensure you use the **Selected Element Is** rule, followed by the **Selected Element Text** rule when adding Visibility Rules to any content or widget.

Adding CSS Selectors ensures that Whatfix can easily find the required element and reduce the possibility of displaying content or widgets on the wrong element. This also reduces the time taken by Whatfix to find the right text on the page. For more information, see [Selected Element conditions as Visibility Rules](/studio/docs/selected-element-condition-rules).

![Visibility_rule_Selected_text_is](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/Visibility_rule_Selected_text_is.png)

****Select good CSS selectors****

Good CSS selectors ensure that your content appears exactly where you want it to appear. For more information, see [Identify an element's CSS selector](/studio/docs/identify-an-elements-css-selector)

****Understand****widget prioritization criteria****

When multiple widgets are configured to appear on the same page, ensure that their Visibility Rules follow the prioritization criteria. This helps avoid conflicts and ensures that the most relevant widget is displayed to users. For more information, see [Understand widget prioritization based on the new Visibility Rules](/studio/docs/understand-the-prioritization-logic-in-visibility-rules-20).

****Configure start and end dates correctly****

Ensure that the widget’s start date, end date, start time, and end time are set correctly to avoid content appearing too early or too late. This is especially important for time-sensitive content such as promotions, surveys, or announcements. Verify the time zone configuration to ensure it aligns with the end users’ local time. For more information, see [Show content based on a specific date](/studio/docs/show-content-based-on-a-specific-date).

****Use Attributes for targeted visibility****

Use User Attributes, Enterprise Attributes, Roles, and Cohorts to segment content. This ensures widgets are shown to the right users based on roles, departments, geography, or other conditions. For more information, see [Set Who can see your Widget](/studio/docs/set-who-can-see-your-widget).

****Test Visibility Rules thoroughly****

Test your widgets thoroughly using the [Preview mode](/studio/docs/how-to-use-preview-mode-to-review-content) to ensure that all Visibility Rules work as intended.

****Ensure that any parent content is in Production****

If your content or widget is launched by any other content, such as **Launchers** or **User Actions**, ensure it is in Production.

## Related

- [Element Reliability indicators in the old Display Rules experience](/improve-element-selection-using-element-reliability-indicators.md)
