Remove URL field from WordPress comment form

One big way that SPAM bots out there get their black-hat backlinks is to place their suspicious (at best) URL’s in the URL field in WordPress’s comment form. It’s still shocking how many sites out there don’t manage comments, and that’s what allows this to not only get through, but give the SPAM bots more than enough reason to keep on going with their dirty work.

function catacaustic_disable_comment_url ($fields) { 
    unset ($fields ['url']);
    return $fields;
}
add_filter ('comment_form_default_fields', 'catacaustic_disable_comment_url');

With the URL field gone, SPAM bots will still try to leave comments, but they can’t submit anything, so nothing will show up on your site.

Even with this simple fix, we still recommend using other additional methods to deal with comment SPAM. What tips and tricks do you have? Use our comments below to let us know! (Of course, you’ll notice that we’ve removed the URL field ourselves, as best practice of course)

Leave a Reply

Your email address will not be published.