Previously I had written about how blog comments are actually good for your SEO efforts and how to paginate them. In a later post, I also taught how to control spam comments on your WordPress powered websites.
It is true that WordPress websites attract a lot of spammers as most of them know how easy it is to build backlinks off from them. Most bloggers do not know how to control spam and they do not have the time to moderate each comment.
This is generally how a spam blog comment looks like.
Notice that these spammers do not use their real name and always leave a backlink to a site, which in most cases may not be related to your website.
The perfect way to discourage spam is to remove the “Website” or “URL” field entirely from your WordPress website.
Let’s think about it, the “Website” field is not useful in most cases, as genuine commenters probably do not own a website and it simply allows spammers to build links to their websites. The more comments containing backlinks will cause your posts to have more outbound links and it will cause harm to your SEO efforts.
There are two methods we can use to remove the website field from comments.
1. Using Plugins to disable Website field from comments
There are many plugins available in the WordPress repository that remove the Website field from the blog comments.
Why Speed is Crucial for SEO & UX?
These expert tips will show you how to improve the speed of your WordPress Websites.
Thank You
Your Ebook is on its Way to Your Inbox.
The most easy way is to install Remove Fields or Remove Comment Website/URL Box.
Navigate to WP-Admin -> Plugins -> Add New and search for “Remove Fields” and install and activate the plugin.
After the successful completion of the installation process, activate the plugin to remove the Website field from blog comments.
For many, this is an easy way out. However, some people may not want to use more plugins on their WordPress website and might prefer editing the WordPress files. Create a backup before making any changes to the files. Cloudways WordPress hosting has automated backups feature too.
2. Editing the WordPress Files to remove the Website field from comments
This method is only suggested to those who are well versed in editing WordPress files and also maintain complete documentation and backups of their WordPress websites.
Navigate to WP Admin -> Appearance -> Editor and select functions.php (It is also known as “Theme Functions”.)
Insert the following code at the last line in the functions.php
add_filter('comment_form_default_fields', 'website_remove'); function website_remove($fields) { if(isset($fields['url'])) unset($fields['url']); return $fields; }
The code above creates a function called website_remove() and removes (or unsets) the URL field.
Using the Hook add_filter(), we pass the argument to default WordPress function comment_form_default_fields that contain fields of the comment form.
If you are a constant target of comment link spam and you have very little time to moderate the comments, then removing the website field entirely will seriously discourage the link spammers.
What do you think is the better way of tackling URL spam on your blog: using plugins or editing the core? Let us know about your views on this issue in the comments section below.
Owais Khan
Owais works as a Marketing Manager at Cloudways (managed hosting platform) where he focuses on growth, demand generation, and strategic partnerships. With more than a decade of experience in digital marketing and B2B, Owais prefers to build systems that help teams achieve their full potential.