You are here:
Create Rules to Moderate Your Experience Cloud Site
Moderation rules help protect your site from spammers, bots, and offensive or inappropriate content. Create and modify rules for your Experience Cloud site to moderate member-generated content. Each rule specifies the member-generated content the rule applies to, the criteria to enforce the rule on, and the moderation action to take.
Required Editions
| Available in: Salesforce Classic and Lightning Experience |
| Available in: Enterprise, Performance, Unlimited, and Developer Editions |
| Applies to: Aura sites |
| User Permissions Needed | |
|---|---|
| To view, create, edit, and delete rules: | Manage Experiences OR Create and Set Up Experiences AND Is a member of the Experience Cloud site |
Your Experience Cloud site comes populated with content and rate limiting moderation rules that block, flag, freeze, replace, or review banned keywords. Simply activate the rules and they’re ready to go. You can customize both the rules and the list of banned keywords in the Rules section of the Moderation workspace.
Alternatively, you can create your own custom moderation rules as needed. You can also use the Metadata API or Tooling API to set up content rules.
If your Experience Cloud site uses the Customer Service template, moderation rules apply to questions and group posts created by your members. If your Experience Cloud site uses Salesforce Tabs + Visualforce, moderation rules can also run on publisher actions.
Some things to keep in mind:
- Your org can have up to 30 rules. This limit is per org, not per Experience Cloud site. This limit includes both content rules and rate rules.
- Each content rule can have up to 3 keyword criteria and 10 member criteria. And each rate rule can have up to 10 member criteria.
- Preconfigured moderation rules apply only to feed posts, comments, and polls.
When Do Moderation Rules Run?
Rules that block content run first, followed by rules to review and approve content, then rules that replace content, and last by rules that flag content.
If two or more rules perform the same action, the oldest rule runs first, based on the date the rule was created. Rules to replace content don’t run when the content also applies to a review rule—we want moderators to review the original content. On the server, Salesforce executes Experience Cloud site rules within the standard order of execution.
Create or Modify Content Rules
To block, replace, flag, or allow you to review and approve member-generated content, create content rules.
- Open Experience Workspaces.
- Click Moderation | Rules.
- Click Edit next to an existing rule. To create a rule, click New | Content Rule.
- Add or update the rule details, including a unique name that’s used by the API, and select Activate Rule to enable the rule.
-
In Rule Conditions:
- Specify which types of member-generated content this rule applies to. Posts and comments only apply to content created in groups and user profiles. All feed types, such as polls and links, are supported.
- Choose whether to block content from being published, allow reviewers to approve the content before it’s published, replace keywords with asterisks, or flag inappropriate content.
- Specify the message that your member sees when their content is blocked. If you
don’t specify a message, the member sees the standard message: “You can’t use
%BLOCKED_KEYWORD% or other inappropriate words in this site. Review
your content and try again.” The %BLOCKED_KEYWORD% variable displays
up to 5 blocked words. You can also use this variable in your own custom message.
For international sites, you can translate this message. From Setup, enter Translate in the Quick Find box, then select Translate. To provide a translation for the message, select the Moderation Rule setup component and expand the site the rule belongs to.
- In Criteria, specify member criteria and content criteria to enforce this rule. Think about who the rule applies to and the specific keywords involved.
- Save your changes.
Keep the following things in mind:
- If you activate a content rule without specifying member criteria, the rule applies to all members.
- If you activate a content rule without specifying content criteria, the rule either:
- Stops members from creating posts and comments entirely
- Sends all posts for review
- Flags all posts and comments
- If you select member criteria and content criteria, the rule applies only when both criteria are met.
- Specifying criteria is optional. However, we recommend that you include criteria in your rules to target specific members and content.
Create Rate Limit Rules
To monitor and limit how frequently member-generated content is created, create or modify rate rules. Rate rules protect your Experience Cloud site against spammers and bots that attack your site by posting the same message multiple times in a row. You can create rate rules to notify your moderators of suspicious spammer-like behavior or freeze a member on the spot.
Each rate rule controls two actions: notification and freeze. You can set up your rate rule for both actions or just one. You can apply the rule to: posts, comments, files, and private messages. In Experience Cloud sites that use the Customer Service template, you can apply rules to questions and answers.
- Open Experience Workspaces.
- Click Moderation | Rules then click New and select Rate Rule.
-
In Rule Conditions:
- Specify which types of member-generated content this rule applies to. Posts and comments only apply to content created in groups and user profiles.
- Specify the member criteria that trigger this rule. If you activate a rate rule
without specifying member criteria, the rule applies to all external users. If you
activate a rate rule without specifying member criteria, the rule applies to all
external users.
Spammers are typically new members. We recommend creating member criteria that only include customer users that were created in the last seven days.
- Specify the time frame that the rule applies to. Determine how much content can be
created within that time frame before the moderator is notified. Determine how much
content can be created before the member is frozen.
When members are frozen, they’re frozen in all sites that they’re a member of.
Emails are sent to users with the Moderate Experience Users permission. Make sure that you assign your moderators this permission. Emails are sent even if a user has turned off Chatter emails.
- Activate the rule.
- Save your changes.
Let’s use the following rate rule as an example.
- Applies To: Posts and private messages
- Member Criteria: Customer users created in the past 7 days
- Content Creation Time Frame: 3 minutes
- Notify Moderators: 6
- Freeze Members: 10
With this rate rule, here’s what happens when a member reaches your limits.
| In the span of 3 minutes, a member creates... | Is the moderator notified? | Is the member frozen? |
|---|---|---|
| 4 posts and 2 private messages |
|
|
| 6 posts |
|
|
| 6 comments |
|
|
| 8 posts and 2 private messages |
|
|
| 10 posts |
|
|
| 10 comments |
|
|
A rate rule with these values protects the site from spammers and bots but also allows you to help your new members. Maybe a non-threatening member posted a question over and over hoping to get it answered faster. Rate rules do more than protect—they let you help members in need.
Here’s a rule set up just for private messages.
- Applies To: Private messages
- Member Criteria: Customer users created in the past 3 days
- Content Creation Time Frame: 15 minutes
- Notify Moderators: 1
- Freeze Members: 3
This rate rule protects the site from spammers that attack via private messages.
If your rate rule doesn’t take immediate effect, give it time. If you set up a rate rule to freeze members when they create content 10 times in 3 minutes. It’s possible for a member to create 9 items towards the end of the first 3-minute time frame. In this case, the member isn’t frozen until they post another 10 items in the second 3-minute time frame.
Check the member criteria you’re using. For example, let's say you have a rate rule that uses member criteria to filter for members without contributions. After a member’s first post or comment, the rule doesn’t apply to the member anymore, so the member doesn’t reach the freeze limit you set.



