Skip to content

How to use filtering and muting to hear less discussion of odious people on Mastodon

It's not a perfect solution, but it's helpful.

A screenshot.  Filtered: Elmo.  In blue, Show anyway.  Filtered: disgraced former.  In blue: Show anyway

Originally written November 2022. Minor updates July 2023, including moving Twitter description to an appendix because who even cares these days.

Twitter's odious new racist, anti-trans management is once again doing odious things.  When I first wrote this article they were reinstating the accounts of odious people who have committed "minor" offensive like anti-trans hate speech, organizing harassment campaigns, and attempting to stage coups. Right before I revised this ... oh never mind the details, you're probably as sick of hearing about Elmo as I am. As usual lots of people are talking about it which means that timelines on social media are filled with discussions of odious people.  Of course I'm not trying to stop anybody from talking about odious people but I really wish I didn't have to hear so much of it.

The good news is that on Mastodon you can use "filters" to reduce how much of this discussion you see on your timelines by telling the software not to show you any posts that include specific keywords.  It's similar to Twitter's "muted words", although better in several ways.

Just to set expectations, this doesn't work perfectly – I'll discuss some of the limitations at the end of the article.  Still, I personally find it's really worth doing.

If you want to give it a try, here's how.

Adding a new filter

If you're using the web interface on a phone, you can get to Mastodon's filters by selecting the little gear icon ⚙ on the bottom right, then the menu at the top right, and then Filters.  If you're using the web interface on a computer,  clicking on Preferences (on the right-hand side of the screen) and then Filters.  

Once you're there, click on the Add new filter button.   Here's a screenshot of the current version, filled out to filter any posts mentioning Elmo.

A screenshot of a complicated dialog, with the title "Add new filter", and at the bottom a big blue "Save new filter" button.  More details in the text.
  • You can have multiple filters, so choose a Title that you'll remember.  
  • Expires after lets you put in temporary filters – for as short as 30 minutes or up to a week – but I never want to hear about this hypothetical Elmo ever again so went with Never  
  • Filter contexts specifies where the filter applies. I checked everything but profiles but you can apply it more narrowly.
  • Filter action is what happens if the filter matches a post.   Hide with a warning works well when you're testing it out; any of the filter matches displayed as a warning message like the one at the beginning of this article; you can then click on if you want to see the post – kind of like a content warning but it looks different). Once I'm confident it's working, I'll change it to Hide completely.
  • The filter applies to posts that have any of the keywords in the text, CW (content warning), or media description (alt-text) for any images or videos included in the post. If you check “whole word,” the filter only applies if the keyword is surrounded by spaces or other non-alphanumeric characters.  Otherwise, it applies to any post with the included characters, regardless of whether they are in the middle of a word.
  • You can add additional keywords as well.  For this filter, I went on to add "Apartheid Clyde", his first and last names, and variants with vowels replaced by an asterisk (a commonly-used technique on Twitter).
  • Once you're done, click the blue Save new filter button at the bottom.

Once I added some additonal keywords and clicked save, here's what my filters page looks like

A screenshot saying Filters.  Below: "Elmo.  8 Keywords. elmo, Apartheid Clyde, SpaceKaren, ..." To the right, Buttons for "Edit filter" and "Delete".  At the top right, a button for "Add new filter"

You can add as many other filters as well; I added one called "disgraced former" and you can probably guess what I put in it.  

You can edit and delete filters too

If you don't get it quite right, or decide you want to add another keyword, no worries: you can click on Edit filter to refine it – or delete it and start again.  

There isn't a cancel button on the Add new filter or Edit filter pages, so if you change your mind partway through, just use the browser's Back button.

Limitations – and an opportunity for innovation

Like I said at the beginning of the post, this doesn't work perfectly.

  • It's very easy to filter out more than you really want.  My "Elmo" filter will also filter out other Elmos.  If I hadn't checked the "Whole word" box for the "Elmo" keyword, I would have also filtered out any mentions of Emore James, Elmore Leonard, and any other Elmores as well.
  • No matter how many keywords you add, you're likely to miss posts that use unusual nicknames, have typos, or don't even refer to the person by name.  
  • Unlike Twitter, Mastodon check's the alt-text associated with images.  That's good!  But unfortunately people often don't provide it.  Not including alt-text is bad from an accessibility perspective too – so when you post images on either of these platforms, please consider taking the time to include alt-text.  Of course, there are a lot of reasons it can be challenging for people to provide alt-text, so please don't give people a hard time if they're not.  I've seen several blind people on Mastodon talking about how irritating it is when sighted people scold them for not providing alt text ... don't be like that.

Still, despite the limitations, filters can be very useful.  Over the last six months, Elmo and Disgraced former have made a big difference in my Mastodon experience!

Mastodon originally had a more powerful but much less usable approach to filtering called "regex filters", which required magic incantations like [^а-яА-Яa-zA-Z0-9_](nastythings?|vilethings?)[^а-яА-Яa-zA-Z0-9_] to work.  Keyword filters were introduced mid-2018; Cassian’s I left Mastodon yesterday and I left Mastodon 27 days ago give some of the backstory.  

Mastodon's implementation has several improvements on Twitter as well.  The ability to filter on CW's and image alt-text is very useful, and so is the option to see warnings for posts that are filtered out.  Mastodon version 4.0, released in November 2022, introduced the grouping of multiple keywords into a single named filter, which is useful from a UI perspective, and it's encouraging to see some progress on this front for the first time in several years..

Even so, there's a lot of room for further improvement.  For example, it would be great if there were a way for users to share filters with each other – even just the import/export functionality that Mastodon offers for blocklists would be helpful. And how cool would it be if instance admins or moderators could set up optional filters that users could then choose to enable with a single click?

It'll be interesting to see if the new surge of interest in Mastodon leads to innovation in areas like this – folks on places like hci.social (a Princeton University-run server for people in and around the Human-Computer Interaction field) have a lot of expertise.  As I say so often when writing about Mastodon ... we shall see!

Updated July 2023, moving the Twitter stuff to an appendix and making some minor cleanups.

Appendix: Muting words on Twitter

Twitter's muted words offers similar funcationality.  Here's the simple ten-step process from their How to use advanced muting options page.

  1. Click More from the side navigation menu, then click Settings and privacy.
  2. Click the Privacy and safety tab, then click Mute and block.
  3. Click Muted words
  4. Click the plus icon. 
  5. Enter the word or hashtag you’d like to mute. Entries can only be added one a time.
  6. Select Home timeline if you wish to mute the word or phrase from your Home timeline.
  7. Select Notifications if you wish to mute the word or phrase from your Notifications.
  8. Specify From anyone or From people you don’t follow.  [I still really don't want to hear about hypothetical Elmo so I specified From everybody.]
  9. Under Mute timing choose between Forever, 24 hours from now, 7 days from now, or 30 days from now.  [I chose Forever.]
  10. Click Save.

How intuitive!  Then you can do steps 4-10 again to add additional words.

It' s a fairly similar process in the Twitter app, although instead of steps 1 and 2 you need to click the icon in the top right corner of your screen, selecting View content preferences, and click on Muted.

Either way, when you mute words, you won't get any notifiations for tweets that include them or see tweets with those words in your timeline – at least theoretically.  Twitter's muted words (unlike Mastodon's filters) don't apply to image's alt-text so a lot gets through.  And my experience is that this functionality is sometimes buggy even at the best of times on Twitter, and right now is not the best of times, so your mileage may vary.  Still, if your staying around on Twitter for now, it's probably worth giving it a try.


Thanks to @nanaslugdiva@sfba.social for suggesting filtering out the bad man, which led to "disgraced former" filter and eventually this post! And thanks as well to @maikel@fedi.maikel.dev for all the discussion and insights on the details.