Link to comment author website comments can attract lots of spam in WordPress. You can remove links from old comments and disable “Website” field in comment form.
This way you will get much less spam comments that want to leverage comments for gaining backlinks.
Watch tutorial on YouTube.
Features:
- Remove “Website” field from comment form.
- Remove author link from existing comments.
- Disable auto links inside comment body text.
Code Snippet
/* veppa_remove_link_from_comment_author https://veppa.com/disable-comment-author-link/ Version: 1.0 */ /* remove link from comment author */ function veppa_remove_link_from_comment_author( $url, $id, $comment ) { return ""; } add_filter( 'get_comment_author_url', 'veppa_remove_link_from_comment_author', 10, 3); /* remove website field in comment form */ function veppa_unset_url_field_from_comment_form($fields){ if(isset($fields['url'])){ unset($fields['url']); } return $fields; } add_filter('comment_form_default_fields', 'veppa_unset_url_field_from_comment_form'); /* disable auto linking urls in comments */ remove_filter( 'comment_text', 'make_clickable', 9 );
Result
This is screenshot after applying code snippet to remove “website” field from comment form in WordPress.
Screenshot shows Neve (classic) and Twenty Twenty Five (FSE — Full Site Editing) theme in WordPress after removing website field from comment form.
FAQ
Will removing comment author links prevent spam?
It will prevent most automated and real user spam intents. Because most spam comments, intend to add links to their websites or affiliate links. Without links there is no much value for spammers to post comments.
This will prevent most spam comments, not all of them.
Will I get spam after removing comment author links?
Yes, there can be spam promoting some products or brands even without links. So it is always advised to manually approve all comments.
Which settings to use for manually approving comments?
Use following steps to hold all comments for manual approval and to get notified when new comment posted. So you can log in and check latest comments for moderation.
- Navigate to “Settings” → “Discussion” page from WordPress dashboard.
- Find “Before a comment appears” field and check “Comment must be manually approved” checkbox.
- Find “Email me whenever” field and check “Anyone posts a comment” checkbox.
- Click “Save changes” button at the bottom of the page.
—
What is next:
- Prevent spam comments using “JS challenge” on free CDN (without plugin).
- Reduce plugins by using regular comment form for “Contact us” page. (speed & resource optimization)
- View more code snippets.