Understanding "only-" Flags

How do "only-" flags work?

A common point of confusion is how multiple only- flags work together, for example: only-reddit only-url=/r/mysubreddit.

The rule is simple: a match is considered valid if ANY of the only- conditions are met.

It is an "OR" condition, not an "AND" condition.

A Common Mistake

Let's say you have the following alert:

Your intent is probably to only get alerts for mykeyword when it appears in the /r/mysubreddit subreddit.

However, because of the "OR" logic, the alert will trigger if:

  1. The content is from Reddit (because of only-reddit).
  2. OR the content's URL contains /r/mysubreddit (because of only-url=/r/mysubreddit).

Since all Reddit content will satisfy the first condition, you will get alerts from all of Reddit, and the only-url flag will have no practical effect.

The Correct Way

If you want to limit your search to a specific subreddit, you should only use the only-url flag.

This will correctly limit your alerts to just the subreddit you're interested in. The same logic applies to other combinations, such as only-hackernews and only-url.

We hope this helps clarify how to get the most out of your alerts!