MediaWiki version:

Special:BlockedExternalDomains is a tool to help fight spam, provided as part of the AbuseFilter extension.



Any domain added to the list of BlockedExternalDomains would be automatically blocked from being added to pages of that wiki. The tool also block addition of subdomains as well.


  • The user adding the link having the abusefilter-bypass-blocked-external-domains right. Currently, by default the bot user group has this right.
  • If the addition is gone through for any reason (an admin adding it, the domain not being blocked at the time of edit, ...) subsequent edits on the page are still allowed. This is exactly as the same as MediaWiki:Spam-blacklist logic.

Usage of the special page

Admin view of Special:BlockedExternalDomains

An admin visiting the special page would see a form for adding a domain with two fields:

  • Domain: The domain to be blocked, it supports adding any link to it but only the domain will be stored and blocked.
  • Notes: A wikitext containing links or reasoning.

Next to each entry, there is a link only visible to admins to remove blocked domain from the list and allow it to be added again.



This list is stored in MediaWiki:BlockedExternalDomains.json and directly editable but any change gets verified.

If you need the list of blocked domains from the API, you can simply request the json page with action=raw. For example



Any attempt to add a blocked domain would trigger an abusefilterblockeddomainhit log entry. You can see them in Special:Log.

While MediaWiki:Spam-blacklist provides more freedom for complex cases, it has many limitation for most common use-cases of banning a domain from being added:
  • It doesn't have notes to provide more context
  • It's hard to search in the page or skim through.
  • It's quite easy to basically ban adding any external link by mistake (which has happened multiple times)
  • Not all admins are comfortable with Regex
  • A large list of regexes slows down editing for everyone adding any link.
There is a Python script to help reduce the manual work. Running this simple python script to migrate spam blacklist with the domain set at the top would provide you two outputs: Content of MediaWiki:Spam-blacklist after migration (i.e. complex regexes) and the json that should be put in MediaWiki:BlockedExternalDomains.json.


  • It doesn't support regex entries yet.
  • There is no way to block adding links based on path (for example adding any link that has /foo/?bar=1 in it).
  • MediaWiki:Spam-whitelist won't have any effect on this list.
  • Similar to MediaWiki:Spam-blacklist, any addition might take up to five minutes to be fully in effect.