HomeWordPressHow To Remove Website Field from WordPress Comments in 2 Easy Ways

How To Remove Website Field from WordPress Comments in 2 Easy Ways


If you have a WordPress website, then I am pretty sure you would have been at the receiving end of spam comments on your articles. Spammers add links either in the comment text box or the website field to generate backlinks from your site to their site to improve SEO. In this article, I will show you how to remove website field from WordPress comments.

Spam on websites, just like receiving spam emails, is one of those annoying things. You want it to stop. But the spammers aren’t going to stop. The only thing you can do is protect your website with the tools available.

How can you control Spam Comments in WordPress?

One of the ways to do this is by using an antispam plugin like Akismet or Antispam Bee, which work by identifying spam automatically and handling them effectively. Of course, this won’t stop the spam, but it at least makes sure it catches most of them and filters it.

Another tactic is to remove the website URL field from the WordPress comment form. This means that one of the options for the spammer to insert a link to their site is taken away or removed. See the example image below, where a spammer has added their site URL in the website field and some junk text in the comment field.

Remove Website Field Comments Spam Website
Spam Comment using the Website Field of the WordPress Comment Form

In the next section, we will review the options and steps to remove the website field from the comment form.

What are the options to Remove Website Field from WordPress Comments?

Option 1: Add a Code Snippet in the functions.php file

For this method, you will need to edit WordPress files and add a few lines of code to stop the display of the website field in the WordPress comment form.

So, proceed with this option only if you are comfortable getting your hands dirty with WordPress.

In the image below, you can see the website field below the comment text box.

Remove Website field from WordPress comments
Website URL Field on the Comment form

Now, let us look at the steps to remove website field from WordPress comments form.

1. Backup your WordPress Installation

Before you start, ensure you have a backup, just as a precaution, in case something goes wrong.

2. Navigate to the Theme File Editor

In the WordPress administration console, navigate to Appearances > Theme File Editor.

Remove Website Field Comments Theme Editor
WordPress Navigation Menu to Theme Editor

3. Open the functions.php file

On this page, select the functions.php file from the right-hand file list. The contents of the file will be displayed in the file editor.

Remove Website Field Comments Code1

4. Add Code Snippet for Website Field Removal

Browse to the bottom of the functions.php file, and add the following code snippet. Next, save the file by clicking on the Update button.

/* Remove website field from WordPress comments form */
add_filter('comment_form_default_fields', 'remove_website_field');
function remove_website_field($fields){
       return $fields;

5. Check the Comments Form

Now that the code changes are complete check the front end to confirm that the website field has been removed from the comments form.

If you are using a cache plugin, purge or clear the cache to avoid viewing a cached page.

In our example, you can see in the image below that the website URL field has been removed from the WordPress comments form.

Remove URL field from WordPress comments form
Website Field Removed from the Comments form

Option 2: Use a Plugin to Remove Website Field from WordPress Comments

If you search the WordPress plugin repository, you will find several options that can remove the website field in the comments. But many of them haven’t been updated for upwards of 7+ years. They may not be compatible with the latest versions of WordPress, and it is a risk from a security standpoint. Make sure any plugin you use is up to date and maintained regularly.

Comment Link Remove and Other Comment Tools is one plugin option to remove the website URL field.

Remove Website Field Comments Plugin
Comment Link Remove Plugin

Download and install the plugin to your WordPress installation, and activate it. Next, go to settings, and select the checkbox against the “Remove website field from Comment form” option. Save settings, and check your post page. The website field will be disabled and not visible in the comment form for visitors to use to insert spam links.

Some WordPress speed optimization plugins like Perfmatters also offer the same feature along with WordPress speed improvement features. This is a premium plugin, though. Explore only if you also need to improve the speed of your WordPress website.


If you are being hit by spam, especially where people or bots are using the website field in the comments form to insert backlinks to their website, then removing it can reduce your spam significantly.

You can use a plugin like Comments Link Remove to do the job for you.

Alternatively, if you are comfortable working with theme files, then you can easily do the same by adding a code snippet to remove website field from WordPress comments.

You may also like:

How to Install WordPress Plugins in Three Ways

How to Enable Object Caching in WordPress

The Art of Minimalist Website Design


Disclosure: Coolfundas is reader-supported. When you buy through links on our site, we may earn an affiliate commission at no extra cost to you. Read more about the disclosure.

↑ Back to Top

Shashi Venkatesh
Shashi Venkatesh
Shashi Venkatesh is a 22-year veteran of the technology industry, with experience developing and managing large-scale web applications for clients. He is a WordPress expert and has consulted extensively in the development of WordPress websites, blogs and ecommerce platforms.


Please enter your comment!
Please enter your name here