How to Deny Access to No Referrer Requests on Multiste with Mapped domains
You could hook intop pre_comment_on_post: add_action( ‘pre_comment_on_post’, function(){ if ( empty ( $_SERVER[‘HTTP_REFERER’] ) ) exit; }); But … be aware, not all requests without an referer are actually spam posts. Some firewalls and proxies strip this field. And most automated spam comes with a Referer field filled with the name of the spammed domain. … Read more