Special:BlockedExternalDomains is a tool to help fight spam, provided as part of the AbuseFilter extension.
Logic
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.
Exception:
- The user adding the link having the abusefilter-bypass-blocked-external-domains right. Currently, by default admins and bot have 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

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.
Storage
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 https://www.mediawiki.org/wiki/MediaWiki:BlockedExternalDomains.json?action=raw
Logs
Any attempt to add a blocked domain would trigger a abusefilterblockeddomainhit log entry. You can see them in Special:Log.
Migration from MediaWiki:Spam-blacklist
- Why?
While MediaWiki:Spam-blacklist provides more freedom for complex cases, it has many limitation for most common usecase 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.
- How?
There is a script to help reduce the manual work. Running phab:P49299 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
Limitations
- 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 affect.