Help
Posted By Gregory

Configuring exceptions for the anti-spam engine


Usually, you need to specify an exception if you use a plugin or a technology that communicates with your website by submitting forms or sending POST requests programmatically. In such cases, Cerber’s anti-spam can block those legitimate requests because it recognizes them as generated by bots. This may lead to multiple false positives, which you can see on the Activity tab. These entries are marked as Spam form submission denied.

How to exclude requests from inspection

To exclude specific POST requests (form submissions) from inspection, go to the Anti-spam admin page and enter a unique part of a request URI into the Query whitelist setting field. Here are a couple of examples.

Exception #1 Permits any requests with the Request URI that starts with the specified string e.g. /ps/wc-ajax=whatever_till_the_end

Exception #2 Permits any requests if the Request URI matches the specified REGEX pattern e.g. /file-upload.php?user_id=23432

Anti-spam for WordPress exceptions

Anti-spam for WordPress – configuring exceptions

How to identify the Request URI

You need to specify a query path and/or query string (request URI) that is used for sending POST requests to your website. The specified string must not include the website domain.

Request URIs on the Live Traffic page in the WordPress dashboard

Request URIs on the Live Traffic page in the WordPress dashboard

Regular expressions

Query whitelist supports regular expressions, one pattern per line. To specify a REGEX pattern, enclose a whole line in two { } braces. For instance, to exclude requests to a file-upload.php script with a numerical GET parameter user_id that contains a number, add this string:

{\/file-upload\.php\?user_id=\d+$}

Note: to specify the slash / character in a REGEX expression, you need to escape it with backslash \ this way: \/

WordPress anti-spam settings

WordPress anti-spam settings

See also: How to stop spam user registrations on your WordPress


I'm a team lead in Cerber Tech. I'm a software & database architect, WordPress - PHP - SQL - JavaScript developer. I started coding in 1993 on IBM System/370 (yeah, that was amazing days) and today software engineering at Cerber Tech is how I make my living. I've taught to have high standards for myself as well as using them in developing software solutions.

View Comments
There are currently no comments.