Wikipedia:Administrators' guide/Dealing with spam

On the world's largest encyclopedia that anyone can edit, and where its content has a powerful search engine presence, spam is an inevitable and ongoing problem. Link spam in particular can easily go under the radar. Most search engines such as Google base their results not only on the search terms but also by how many other sites link back to a certain site, and how many other sites link to those sites, etc. Wikipedia is one of the top 10 websites in the world, so obviously it is a prime target for link spamming. Fortunately admins have numerous tools to fight any form of spam.

[[Image:Admin mop.PNG|25px| ]]Blocking or protecting
The first attempts to prevent the spam follows how you would deal with any abuse. In ascending order of the things you should try:


 * Block the spammers, provided the disruption is limited to one or a few users, and they've received sufficient warning. For a spam only account, you can block indefinitely and template them using uw-soablock. If they are also editing under a promotional username you can instead use uw-spamublock. In the case of the latter, you may not need to issue all four levels of warnings before blocking as it is a username violation. However be sure to not to confuse obvious spam-only accounts with those who have good intentions, in which case you could perform a soft block and issue the uw-softerblock template.
 * Protect the affected pages. Oftentimes multiple IPs will add promotional content to a page for which they have a conflict of interest. Here instead of making multiple blocks on what could be shared IPs, simply semi-protect the page. Use the same procedure as protecting against any abuse: start with a short duration and extend it as necessary.

[[Image:Admin mop.PNG|25px| ]]XLinkBot
A nifty bot that patrols recent changes and reverts edits containing certain external links. The configuration for this bot can get quite complex, but in its simplest form you can add the link to the revert list using regular expressions. This does not prevent reference spamming, and limits it to a single revert. To ensure the bot always reverts a link addition you can also add the regex to override list or hard override list, but this should only be used for short-term issues. Beyond the simple revert lists, you can instruct the bot to only revert on certain pages, or from certain users, and even have it issue customized warnings. See the bot's user page for the full instructions. Please read the instructions and ensure you know what you are doing. Seek help from other admins at WP:AN if you are unsure. Alternatively you can request link additions at User talk:XLinkBot/RevertList.

[[Image:Admin mop.PNG|25px| ]]Spam blacklist
For long-term repeated addition of spam links, there is the MediaWiki-provided SpackBlackList extension.

Before adding links here:
 * Ensure the other aforementioned routes are not effective
 * Ensure all links have been removed before blacklisting
 *  A simple typo can cause substantial disruption.

If you are sure the spam blacklist is the appropriate route:
 * Add the appropriate regex to MediaWiki:Spam-blacklist
 * Log the entry at MediaWiki talk:Spam-blacklist/log

If you need help at any time you can request additions to the blacklist at MediaWiki talk:Spam-blacklist, or seek help from other admins at WP:AN.

[[Image:Admin mop.PNG|25px| ]]Edit filters
The edit filter is a last resort and restricted only to the most complex cases of spam abuse. Creation of new filters requires the abusefilter user right, which admins can assign to themselves, but you should not do this unless you are very familiar with regular expressions and how the abuse filter extension works. Like the spam blacklist, the edit filter affects every single edit that comes through, so a small typo can cause massive disruption. If you have never worked with filters, give the guideline a thorough read. Simply put,  unless you are certain of what you are doing, and always test them in log-only mode first.

There are several filters that regularly pick up spam-related abuse. You can monitor their logs to identify recent cases of spam:
 * Special:AbuseFilter/80
 * Special:AbuseFilter/271
 * Special:AbuseFilter/466
 * Special:AbuseFilter/499

Any inquiries on whether an edit filter is appropriate or feasible can be brought to the edit filter noticeboard.