How To Remove The URL Field From WordPress Comments Form

Remove URL Field From WordPress Comment Form

You may have noticed that some WordPress blogs have comment form but not URL field in it. Spammers generally fill your blog with spam comments just to get backlinks in the comments section. So removing the URL field from the comment form helps us to protect the blog from these spammers. This is the reason why many authority blogs remove the URL section from the comments form. This must be done if you have auto-approval of comments turned on in your blog.

How to Remove URL field from WordPress Comments by editing code

Removing comment field from is an easy task if you know how to edit or modify code. You can use this code and add it in functions.php file.

Navigate to WP Admin -> Appearance -> Editor and select functions.php to add the following code.

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

This code creates a function unset_url_field and removes the URL field.

Remove URL field from WordPress Comments with a plugin

If you do not know how to edit code or afraid of doing this, you can try a nice WordPress plugin that will remove URL from comment form automatically. This plugin is disable-hide-comment-url. After installation, it will remove the URL option from the comment box. You can also install Remove Fields or Remove Comment Website/URL Box plugins for the same.

By following above methods, you can remove URL field from comment box and prevent spam bots from your blog.

If your WordPress based blog is the constant target of comment link spam and you don’t get much time to moderate the comments, you can think of removing website field from the comment section to discourage the link spammers. In case you do not want to remove the website field, you can install captcha plugin add a captcha in the comments form to discourage bots that autofill comments. I won’t prevent people from manually putting spam comments but can reduce automated bot comments.

If you know any other easier method of doing this task, you can share it with us via comments.


Deepanker Verma is the founder of Techlomedia. He is a tech blogger, developer and gadget freak.

Similar Articles


  • Fahad Rafiq says:

    WordPress websites and blogs are frequent targets of spam comments. To effectively stop the link spammers it is best to remove the “Website” field from the WordPress comment section.

Leave a comment

Comment policy: We love comments and appreciate the time that readers spend to share ideas and give feedback. However, all comments are manually moderated and those deemed to be spam or solely promotional will be deleted.

2020 UseThisTip | Part of Techlomedia Internet Pvt Ltd Developed By Deepanker