How to Remove the URL Field from the Comment Form on WordPress? 2 Methods

Remove URL Field From WordPress Comment Form

If you are a blog owner, you know comments are useful. They create engagement and are a great feedback tool to get to know your readers to not only improve your content quality but also to find new blog ideas. Comments allow readers to interact with each other and help create a community as well as grow your blog’s reputation.

While these are the visible advantages of having an active comments section on your WordPress blog, there are also some disadvantages that are not as easily visible. For small blogs that don’t have an active content moderator, comments can be filled with spammy irrelevant content that is not of any interest to the website’s readers as well as owners.

So let us see why such comments are posted, making it a task for content moderators to read through and trash them, and how you can directly remove URL fields in the WordPress comments form to completely avoid such comments to have a healthy and productive comments section on your WordPress website.

Why are Spam Comments Posted on Websites?

To begin with, let’s address the cause of such spammy irrelevant comments posted on blogs. You must have noticed such kinds of comments on your WordPress backend and the short answer for weird and irrelevant comments on blogs is black hat SEO. 

If you notice, the spammy commenting is typically done with a dummy throwaway account that does not show the commenter’s real name or other information. This is because such comments are posted on blogs that have decent traffic to mooch off the traffic. 

By leaving a backlink (URL in their comments) the website will then help the commenter’s backlink inadvertently. Backlinks are usually given as a way for website visitors to find relevant content and search engines consider such backlinks as a reliability metric. This is what the spammy commenters want to exploit. 

Two Ways Spam Comments with Backlinks Affect Your Website SEO

If your website is getting good traffic and is referring to the spammer’s URL through a comment, this helps improve the SEO performance of the spammer’s website. This piggyback riding done by spam comments has the potential to affect your website’s SEO as well.

  1. Search engines like Google and Bing consider the kind of backlinks your website is pointing to. If your website is linking to low-quality, suspicious websites like the ones in spammy comments, search engines may find your website untrustworthy and this will affect your search rankings and resultantly, your website’s traffic.
  2. Having spam comments that are not relevant to your website’s content and are not giving value to your readers can cause readers to lose trust in your website content and it also makes for a bad user experience. 

So it is vital as a blog owner for you to monitor the comments on your website and remove spammy comments that leave backlinks to shady websites. Manual content monitoring can be time-consuming and as your website’s traffic grows, it may become impractical to monitor all the comments posted on your website. This will require hiring a content moderator. 

You can avoid this by simply removing the URL field in your WordPress website’s comments form. This effectively filters out people who comment with the sole purpose of gaining traffic and backlink from your website.

How to Remove URL Field From WordPress Comment Form?

Method 1 – By Editing the Theme’s function.php file

There is no official way to remove the URL field when accepting a comment in WordPress. While you can use a plugin to remove the website field from the comments form, there is an easier method to do it if you don’t mind tinkering with your WordPress files a little. By adding a code snippet to your website’s theme file you can remove the URL field in the comments form. Let us see in steps how you can do that.

Go to your WordPress admin section. Here, in the left-hand menu, click on Appearance > Theme Editor.

How to remove the URL field from the Comment Form on WordPress?

Here you will be able to access the theme files to which you can directly make changes. WordPress does not recommend this for users without technical expertise as it may break your site and gives a warning for this as well. When the warning shows up, proceed and go ahead with it anyways. 

Now you are in the Edit Themes section where you can access and make changes to the different files that make up your website’s theme.

How to remove the URL field from the Comment Form on WordPress?

On the right-hand side, you will find the Theme files. Here, click on Theme functions. This will you open the functions.php file where you should add the code snippet to remove the URL field from the WordPress comments form.

Here, copy and paste the following code in the last line.

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

This will do two things, first, it will create a function called remove_comment_url which will remove the URL field from the fields array. The add_filter function will then add the remove_comment_url to the comment_form_default_fields filter. This will then remove the URL field from the comment forms henceforth. Remember to update the file before proceeding.

Now you will see that the URL field is now removed from your blog’s comment form.

How to remove the URL field from the Comment Form on WordPress?

This is one way to remove the URL field from the WordPress comments form.

Method 2 – With a Plugin

You can also go with a plugin if you don’t want to make changes directly to your website’s files. Use a plugin such as Comment Link Remove. Install and activate the plugin and go to your WordPress dashboard and click on Installed plugins. There you can find the Comment link remove plugin. Click on Settings to remove the website field in the WordPress comments form.

How to remove the URL field from the Comment Form on WordPress?

In the general settings, you can find “Remove WEBSITE Field from Comment Form”. By default this is turned off, you can turn it on and it will then remove the website field from the comment forms on your website’s posts.

If you don’t mind editing your WordPress website’s theme files directly, you can go ahead with the code snippet method. If you are worried about your website breaking and want a simpler solution that doesn’t require much technical knowledge, you can go with the plugin method. Either way, this useful feature helps you filter out spammy comments on your website that are done with the intention of gaining backlinks by posting irrelevant content. Let us know your thoughts in the comments.

Further Reading

LEAVE A REPLY

Please enter your comment!
Please enter your name here