Possible Duplicate:
Removing the “Website” Field from Comments and Replies?

In looking at suggestions on how to remove the website (URL) field from the comment to help reduce comment spam, most recommend editing the comment template to remove the field.

But I also found a couple sources saying spamming tools may be bypassing the comment template altogether making this approach only a partial fix. If that is true is there any additional steps that can be taken?

  • Welcome to WordPress Stack Exchange. When writing a new question always look at the list of related questions to see if your problem has been solved already. When there are similar questions with answers and they didn’t help you add a note to your question saying what you have tried already and what didn’t work.
    – fuxia
    Aug 25, 2012 at 17:06

1 Answer 1


Yes that's true ... many spam tools go direct to the post comment url and inject spam that way. What you are looking to do is Block Comments coming from Referal URL's that don't include your host.

Just add this code to your theme's function.php after a day or so you should see a drop off in spam. But nothing is 100% bullet-proof here :)

//Block Referal URL exploit for Comments
function verify_comment_referer() {
if (!wp_get_referer()) {
    wp_die( __('You cannot post comment at this time, may be you need to enable referrers in your browser.') );
add_action('check_comment_flood', 'verify_comment_referer');
  • I believe I understand how this will work on concert with removing the URL field on the comment form.
    – Jerry
    Aug 25, 2012 at 23:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.