[Solved]: How to Remove Website URL Field from the WordPress Comment Form?

Many blogs experience a serious problem with spam comments. The goal to get backlinks by exploiting the website URL field in the WordPress comment form is the main reason for spam comments.

Since automated bots create the majority of spam, you can quickly stop comment spam using free tools and plugins.

Discouragement of manually-submitted spam comments by people is the more difficult component. These unwelcome comments, which are frequently off-topic and useless and add nothing to the conversation, are posted by real users.

This post will demonstrate how to remove the WordPress comment form’s website URL field. Additionally, we’ll discuss how removing the URL field from the comment form will help reduce spam.

  1. Why Do Users Post SPAM Comments?
  2. How to remove the website URL field from the WordPress comment form

Why Do Users Post SPAM Comments?

Well, people post spam comments in an attempt to improve their SEO. They do this by including the URL of their website. They will receive a backlink from your website in this way. They know that the more trustworthy sites that link to them, the higher their SEO ranking will be.

This is a BlackHat SEO technique, and it typically doesn’t work. But any blog owner would admit that they still get a ton of spam comments every day.

Name, email, website URL, and comment field are the four fields that represent WordPress’ standard comment form.

WordPress' standard comment form
WordPress’ standard comment form

We’ll be eliminating the above-mentioned website URL section to help prevent the spread of comment spam.

How To Remove The Website URL Field From The WordPress Comment Form?

In the functions.php file of your theme or any plugin-specific field or file, put the following code:

add_filter('comment_form_default_fields', 'blorax_unset_url_field');
function blorax_unset_url_field($fields){
       return $fields;

It helps manually remove the Website URL field from the WordPress Comment Form and now it should look like this:

[Solved]: How to Remove Website URL Field from the WordPress Comment Form? 1
WordPress’ optimized comment form

It is NOT a 100% solution for blocking all spam comments on the target website, but it helps to reduce the total amount.

Real users will comment on your posts whether or not they receive a backlink, but now, when they will manually try to submit a comment for a backlink and see that you don`t provide this feature on the website, they will think twice about the purpose of spamming your website.

We hope that using this solution will help you minimize comment spam on your website.

Please note! Take a FULL Backup of your website before ANY optimization steps and TEST it.

We hope you find these code snippets useful!

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *