How To Disable “Website” URL field in WordPress comments

Agha Muhammad | May 27, 2024 

How To Disable “Website” URL Field In WordPress Comments -

Table of Contents

Getting “Do-Follow” links from good DA(Domain Authority) and high-traffic websites is still considered to be beneficial for your website’s visibility on SERPs.

There are many ways to get a “Do-Follow” link for your website from others through guest posting, earning links on your good content, and collaboration. But there are also some inappropriate ways to get do-follow links, one of which is spam commenting on WordPress websites.

You can view below some Spam comments to know how it looks.

You can usually identify the spammers by their names as they do not set their original names on their profiles. Also, you can identify them through their comments as usually, their comments aren’t relevant to your post.

To solve this problem once and for all, the best solution is to remove the “Website” field from your comments section. This will prevent spammers from mentioning their websites in your comment section as do-follow links. 

There are many disadvantages of having spam comments on your site as it affects your overall website and its authenticity. Some of the cons are mentioned below:

  • Search engines may penalize your website if it has many spammy or low-quality outbound links in the comments.
  • Spam comments clutter the comments section, making it difficult for genuine users to engage.
  • Some spam comments may contain malicious links or code that can harm your website or its visitors.
  • Visitors who encounter a lot of spam comments may leave your site quickly, increasing your bounce rate.

There are 2 solutions that we are going to cover in this tutorial.

Method 1: Editing the WordPress Files through code

This method can be used if you are very well familiar with editing WordPress files. You just have to follow the steps and insert the code.

Note: Always take a backup before making any changes to the code. I recommend using a child theme to make any changes in the code.  

Navigate to WP Admin -> Appearance -> Theme File Editor and click functions.php. 

Scroll until the written code’s end and paste the code below. 

add_filter('comment_form_default_fields', 'website_remove');
function website_remove($fields)
return $fields;

The above code will help you to remove URL field through creating a function called website_remove(). This is how your comment form will like after you have added the code.

If you are unable to see “Theme File Editor” then you can add the code we have mentioned above directly into the functions.php file by accessing your WordPress files via the File Manager through your hosting provider. Talk to the support team of your hosting provider if you do not know how to do it.

Method 2: Removing URL Field through WordPress Plugin

The second method to remove the URL field is with the help of a WordPress plugin. There are many easy-to-use WordPress plugins for this task. 

The simple way is first to install the Comment Link Remove Plugin and Comment Tools or Remove Comment Website/URL Box plugin. 

After successfully installing the plugin, simply activate the plugin to remove the Website field from the comment section.

Finally, after activating the plugin, you just have to check the “Remove WEBSITE Field from Comment Form” field and save it to disable the website field in your comment section.

This method is the most simple method to remove the “Website” URL field from the comments. Whereas there are some people who do not want to add multiple plugins to their site, so they could use the first method by editing the code and removing the website field.

You can also use reCAPTCHA by Google to fight automated spam by distinguishing between human and automated access and avoid bots accessing websites for spamming.

Benefits of disabling the “Website” URL field in WordPress comments

There are some benefits of removing the website field:

  • Reduced Spam Volume: Removing the “Website” field significantly decreases the incentive for spammers to leave comments on your site.
  • Improved User Experience: With fewer spam comments, the comments section remains clean and relevant, making it easier for genuine users to engage.
  • Better SEO: Reducing the number of spammy backlinks in your comments helps maintain the quality of your site’s link profile.
  • Lower Server Load: Fewer spam comments mean less data for your server to process, which can improve your site’s performance and speed
  • Focus on Content Quality: Without the distraction of spam comments, users can focus on the quality of the discussions and the content itself

We hope that you learned something new today in fighting against comment spam. There are dedicated plugins and services that help you fight spam comments, one of them is Akismet, which protects websites against all kinds of spam. 


Agha Muhammad
I'm Agha, a WordPress Community Manager at
cPanel + LiteSpeed Enterprise + NVMe
Fast WordPress Hosting 
Starts at $1
What to read next?