Tag - Comment

How to Remove Website URL Field from WordPress Comment Form


Spam comments are a huge problem for many blogs. The biggest reason for spam comments is the desire to get backlinks by using the website url field in the WordPress comment form.

Since majority of the spam is generated by automated bots, you can easily combat comment spam by using free tools and plugins.

The trickier part is to discourage spam comments submitted manually by humans. These unwanted comments are submitted by actual users and are often off-topic, irrelevant, and add no value to the discussion.

In this article, we’ll show you how to remove the website URL field from the WordPress comment form. We’ll also explain why removing the URL field from the comment form will help you discourage spam.

Removing website URL field from WordPress comment form

Why Do People Submit SPAM Comments?

The short answer to that question is SEO or Search Engine Optimization. Let’s take a look at that in details.

Have you ever received comments from users like “Best WordPress Themes”, “Make Money Online”, or “MyBlogName” on your website? Why do they use such keywords instead of their real name?

By default, the WordPress comment form has four fields: name, email, website URL, and the comment box.

When displaying the comments, WordPress automatically hyperlinks the name of the commenter with the website URL they provided.

This backlink provides an incentive for blackhat SEO marketers and newbie bloggers.

They believe this tactic can help them get better rankings for specific keywords in search engines.

This technique does not work for SEO in most cases, but that hasn’t stopped spam comments.

This is why we have removed the URL field altogether from our WordPress comment form. By doing this, we have greatly reduced the number of spam comments on our site.

Real users will leave a comment on your articles whether they get a backlink or not. If someone doesn’t want to comment on your website because they are not getting a backlink, then you really have to question their intention in the first place.

That being said, let’s take a look at how to easily remove the website field from WordPress comment form. We will cover two different methods, and you can choose the one that works best for you.

Remove Website Field from WordPress Comment Form (Plugin)

This method is easier and recommended for all users.

First, you need to install and activate the Comment Link Remove and Comment Tools plugin. For detailed instructions, please follow our step by step guide on how to install a WordPress plugin.

Upon activation, you will see a new menu item called “QC CLR Settings” in the left sidebar of your WordPress admin panel. Clicking on it will take you to plugin’s settings page.

Comment Link Remove and Comment Tools plugin

From here, you need to check the box next to “Remove WEBSITE Field from Comment Form” option.

Once done, you need to scroll down to the bottom of the page and click on the Save Changes button to store your settings.

Since you are already logged in, you will not see the full comment form when visiting an article on your website.

You need to either log out from the WordPress admin area or open a new incognito browser window. After that, you can visit any post on your WordPress site to see the comment form without the website URL field.

Comment form without website URL field

Removing the website field will discourage users who only want to comment on your website to get a backlink.

However, the comments that are already approved will still have their author names linked to their website URL.

To remove them, you need to go back to the settings page of this plugin and check the box next to the “Remove hyperlink from comment AUTHOR Bio” option.

Once you save the changes, the links from the existing comments will be removed as well.

Manually Removing the Website URL Field From WordPress Comment Form

Some users always want to learn how to do things manually instead of using a plugin. The good news is that you can certainly remove the website field from the comment form with the help of a code snippet.

To get started, you need to take a full backup of your WordPress site. This will help you to restore your website files in case you break anything while editing the theme files.

Next, you need to copy and paste the following code to your theme’s functions.php file or a site-specific plugin:

add_filter('comment_form_default_fields', 'unset_url_field');
function unset_url_field($fields)
    if(isset($fields['url']))
       unset($fields['url']);
       return $fields;

This code simply removes the website field from your WordPress comment form. You can visit a blog post on your website in a new incognito tab to see it in action.

We hope this article helped you to learn how to remove the website URL field from the WordPress comment form.

You may also want to check out our guide on how to add reCAPTCHA to WordPress comments to prevent spam comments. For more tips, also see our 12 vital tips to combat comment spam in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Remove Website URL Field from WordPress Comment Form appeared first on WPBeginner.



Source link

12 Vital Tips and Tools to Combat Comment Spam in WordPress


Are you getting tired of dealing with comment spam on your WordPress blog? Well, you are not alone.

Spam comments are a huge problem especially if you are not prepared to deal with them properly.

In this article, we’ll share the best WordPress comment spam plugins and helpful tips to combat spam comments in WordPress. These tips will save you a lot of time and will significantly eliminate comment spam from your website.

Combat WordPress comment spam with these tips and tools

Why You Need to Deal with Comment Spam in WordPress?

Internet is full of spam bots that automatically spread links for nefarious websites in the form of comment spam. The purpose of these spam comments is to get ranked in search engines and also to get accidental clicks from unsuspecting visitors.

But not all comment spam is submitted by bots. There are actual human submitted spam comments as well. These off-topic and poorly written comments are harder to catch and often contain links to third-party websites.

If you are not monitoring your website and these comments get published, then both your actual users and search engines will be able to see them.

This affects your website’s reputation. Users would consider your website to be a low quality or spam website.

Search engines can also mark your website as unsafe if they found links to websites that distribute malware and viruses.

That being said, let’s see how you can combat comment spam effectively, so that you spend less time worrying about spam and more time on growing your online business.

1. Turn on Comment Moderation in WordPress

Let’s first make sure that no comment on your website is published without your approval. This step will ensure that comments don’t bypass any filters, and it will also give you full control on which comments appear on your website.

This solution is highly recommended for business websites such as law firms, accounting, etc.

Head over to the Settings » Discussion page inside WordPress admin area. Next, scroll down to the ‘Before a comment appears’ section and check the box next to ‘Comment must be manually approved’ option.

Enable comment moderation in WordPress

Don’t forget to click on the ‘Save changes’ button to store your settings.

All your WordPress comments will now be held for moderation and you will have to manually approve each comment before it appears on your website.

Now you may be wondering how would I go through all the comments? Well in the next few tips, we will show you how to eliminate spam comments so that you only have to go through genuine comments.

2. Activate Akismet Anti-spam Protection

Akismet anti-spam protection

Akismet is an anti-spam plugin that comes pre-installed with WordPress. It filters all WordPress comments on your website through their anti-spam database and catches the most common types of spam comments.

Akismet is available as a free plugin, but you’ll need to signup for their API key. You can get it free for a personal blog or a small website.

To set it up, see our guide on how to set up Akismet for beginners with step by step instructions.

3. Using Sucuri to Combat Spam Comments

Sucuri website firewall

While Akismet is able to catch a lot of spam comments, it cannot stop spammers from accessing your website. Too many requests from spammers to submit comments can slow down your website and affect performance.

This is where Sucuri comes in. It is the best WordPress firewall plugin that allows you to block suspicious requests before they even reach your website.

They can prevent automated bots and scripts from submitting comments. This reduces the load on your servers and the number of spam comments you receive.

4. Using Honeypot to Catch Spam Bots

Honeypot anti spam technique

Honeypot technology is an effective method to trick spambots into identifying themselves. Once they are identified their comments can be blocked.

First, you need to install and activate the Antispam Bee plugin. Upon activation simply go to Settings » Antispam Bee page and check the option to mark as spam for all honeypot caught comments.

Don’t forget to click on the save changes button to store your settings.

The plugin will now use the honeypot technique to catch the bad spam bots. It also has other antispam filter such as validate the IP address from your WordPress comment blacklist, look at bbcode, look in local spam database, and more.

5. Add Google reCAPTCHA Verification

Using reCAPTCHA in WP Comments plugin, you can enable Google reCAPTCHA challenge on your comment forms.

WordPress comment form with reCAPTCHA enabled

ReCAPTCHA is an advanced form of CAPTCHA, which is a technology used to differentiate between robots and human users. CAPTCHA is an acronym for “Completely Automated Public Turing test to tell Computers and Humans Apart”.

Google makes it easy for users to verify their identity by simply clicking on the checkbox button.

For spambots, this technology is quite hard to bypass because when Google detects a spam bot, it gives them a much harder challenge.

See our guide on how to how to add reCAPTCHA to WordPress comments.

Note: while most WordPress comment captcha plugins are annoying, this is the best form of CAPTCHA you can use.

6. Removing Website URL Field from Comment Form

Remove website field from the comment form

The URL field in the comment form attracts not only spammers (both automated and human), but it also invites people who have absolutely no interest in the discussion at all.

These comments usually contain a line or two of irrelevant nonsense, and the comment author name will contain a keyword or a combination of a real name with keywords like Sally from Dunder Mifflin, or John @SEOconsultants, etc.

Simply add the following code to your WordPress theme’s functions.php file or a site-specific plugin.


function wpb_disable_comment_url($fields)  
unset($fields['url']);
return $fields;

add_filter('comment_form_default_fields','wpb_disable_comment_url');

This code simply filters the WordPress comment form fields and removes the website field from the form.

Note: you will need to login to your WordPress hosting via FTP to upload the code above.

7. Disable Comments on Media Attachments

WordPress automatically creates image attachment pages where users can see an image and even leave a comment on it.

If you are linking your images to the attachment page, then after a while you will have a lot of attachment pages with comments enabled on them.

If images are a central part of your content, then that’s fine. But if you don’t want users to comment on images, then you should turn off comments on media attachments.

The easiest way to do this is by installing the Disable Comments plugin. Upon activation, go to Settings » Disable Comments page and check the box next to ‘Media’ option.

Disable comments for attachments

Click on the save changes button to store your settings. The plugin will now disable comments on your WordPress media files and attachments.

8. Disable HTML in Comments

Disable HTML in WordPress comments

Another handy tip to discourage links in comments is disabling HTML in comments. HTML can be used to hide spam links in WordPress comments.

Simply add the following code to your theme’s functions.php file or a site-specific plugin.

    function wpb_comment_post( $incoming_comment ) 
    $incoming_comment['comment_content'] = htmlspecialchars($incoming_comment['comment_content']);
    $incoming_comment['comment_content'] = str_replace( "'", ''', $incoming_comment['comment_content'] );
	return( $incoming_comment );
    
    function wpb_comment_display( $comment_to_display ) 
     $comment_to_display = str_replace( ''', "'", $comment_to_display );
     return $comment_to_display;

add_filter( 'preprocess_comment', 'wpb_comment_post', '', 1);
add_filter( 'comment_text', 'wpb_comment_display', '', 1);
add_filter( 'comment_text_rss', 'wpb_comment_display', '', 1);
add_filter( 'comment_excerpt', 'wpb_comment_display', '', 1);
remove_filter( 'comment_text', 'make_clickable', 9 );

This code changes HTML code into HTML entities which are displayed as the code and are not parsed by the browser.

9. Minimum and Maximum Comment Length

Another way to combat comment spam is by using Yoast Comment Hacks plugin to set a minimum and maximum comment length.

Recently we ran into a comment spam problem where a spammer was leaving hundreds of comments per hour with a single word: hello.

Akismet and Sucuri were not able to block this because the comment looked natural. Antispam bee honeypot slowed the spammer down, but it too wasn’t able to entirely block the attack.

We simply enabled the Yoast Comment Hacks plugin and set the minimum comment length. This forces the user to leave a more meaningful comment instead of just a one word message.

10. Disable Trackbacks in WordPress

A big portion of comment SPAM is trackbacks. For most blogs, it is not necessary to have trackbacks enabled. You can choose to disable trackbacks on your entire blog or in an individual post. This is an easy way to significantly reduce comment SPAM.

Disable trackbacks in WordPress

You can find the above option by visiting Settings » Discussion. This will turn off trackbacks for your entire site.

11. Turn off Comments on Old Posts

WordPress allows you to turn off comments on old posts. This particularly helpful for websites publishing content that is more timely like news or events websites.

Simply go to Settings » Discussion, under ‘Other comment settings’ you will see the option ‘Automatically close comments on articles older than’. Check the box next to this option and enter the number of days you want comments to be displayed on a post.

Close comments on older articles

WordPress will now automatically close comments on posts older than the number of days you defined for this option. If you need, you can override comment deadline in WordPress for individual posts where you would like comments to remain open.

12. Switch Off Comments

In case you feel that you don’t need comments on your WordPress site, or comment moderation goes out of your hands, remember that you can always switch off comments in WordPress. All you have to do is go to Settings » Discussion and uncheck the box next to ‘Allow people to post comments on new articles’.

Turn off comments

You can also make comments for registered users only by checking the box in your Settings ~ Discussion page. For more details, see our guide on how to completely disable comments in WordPress.

Frequently Asked Questions by Users

Why are they spamming me?

Spammers want to get better search rankings or lure unsuspecting visitors to dubious and malicious sites. They think that by spamming they can get more links, and it will somehow positively affect their search rankings.

In most cases, it is not a personal attack against you rather it’s a systematic process that targets many blogs.

What happens to comments that are marked as “Spam”?

The comments that you mark as spam, are not displayed on your website. You can delete Spammed comments in batch and/or recover good comments from the SPAM list.

Spam comments

Why is every comment going into the moderation queue?

You enabled the comment moderation as the first tip in this article. This gives you absolute control on any comment that gets published on your website.

We hope this article helped you find useful tips and tools to combat comment spam in WordPress. You may also want to see our guide on how to grow your website traffic and convert users into subscribers by creating an email newsletter.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post 12 Vital Tips and Tools to Combat Comment Spam in WordPress appeared first on WPBeginner.



Source link

How to Add reCAPTCHA to WordPress Comment Form


Are you looking to add reCAPTCHA to your WordPress comment form?

Spam comments have gotten out of control for WordPress websites. As spammers become more sophisticated, they can launch massive spam attacks with little effort.

Akismet, the popular spam filtering service for WordPress blocks about 7.5 million spam comments every hour. Dealing with spam comments can be frustrating, and some bloggers even choose to completely disable comments on their websites.

Instead of turning off the comments, you can add CAPTCHA to the comment form to practically eliminate spam.

In this tutorial, we’ll show you how to easily add reCAPTCHA to the comment form of your WordPress website.

Add reCAPTCHA to WordPress Comment Form

What is Google reCAPTCHA?

ReCAPTCHA is an advanced form of CAPTCHA, which is a technology used to differentiate between robots and human users. CAPTCHA is an acronym for “Completely Automated Public Turing test to tell Computers and Humans Apart”.

Google acquired CAPTCHA technology in 2009 and then later rebranded it as reCAPTCHA. They also made it easier for human users to easily pass the test.

Basically, it presents users with a simple check box that they can click to pass the test. If for some reason the test doesn’t validate, then the user will be presented with a challenge identifying text in an image or matching objects in multiple images.

Google have made reCAPTCHA publicly available, so that website owners can use it on contact forms, login pages, and comment forms to reduce spam.

Here’s an example of what reCPATCHA test looks like to majority of your users:

Google reCAPTCHA tickbox

It is super easy to setup and add to the WordPress comment form.

With that said, let’s see how to easily add reCAPTCHA to the WordPress comment form with step by step instructions.

Step 1: Get Started

First thing you need to do is install and activate the reCAPTCHA in WP comments form plugin. You can see our step by step guide on how to install a WordPress plugin for detailed instructions.

Upon activation, you need to visit Settings » reCAPTCHA in Comments page to configure plugin settings.

reCaptcha plugin settings page

The plugin will ask you to provide Google reCAPTCHA API keys. You can create these keys for free from the official reCAPTCHA website.

Step 2: Register Your Website to Get reCAPTCHA API Keys

The plugin needs 2 Google API keys to add a reCAPTCHA checkbox to your comment form.

To get the API keys, head over to the Google reCAPTCHA website and click on the ‘Admin Console’ button located at the top right corner of the screen.

Visit Google reCAPTCHA website

You’ll be asked to sign in with your Google account. After that, you’ll see the “Register a new site” page where you need to provide some basic information to register your site.

First, you need to type your website name or any name of your choice in the Label field. This will help you easily identify your site in the future.

Adding a new site

Next, you need to select the reCAPTCHA V2 radio button.

This will open up 3 new options. Since you want to add the reCAPTCHA checkbox to your site, you need to select the “I’m not a robot checkbox” option.

The Domains textbox allows you to add the domain name of your website where you would like to add the reCAPTCHA checkbox.

You can also add multiple domains or subdomains by clicking on the plus (+) icon. This will allow you to use the same API keys on different websites.

Add domain and email to reCAPTCHA site

Under Owners, Google will already add your email address. You can also add another email if you want.

Next, you need to accept the terms of service to use Google reCAPTCHA on your site.

Also, select the “Send alerts to owners” checkbox to allow Google to send emails to you if they detect any misconfiguration or suspicious activity.

Submit and register your WordPress site

Once you’ve filled the form, you can click on the Submit button to register your site.

Google reCAPTCHA will now show you a success message along with the site key and the secret key on this page.

Copy site and secret keys

You can now use these API Keys in plugin settings on your website.

Step 3: Add reCAPTCHA to WordPress Comment Form

Head over to Settings » reCAPTCHA in Comments from the left sidebar of your admin panel.

On the settings page, you need to scroll down to paste the site key and the secret key.

Add Google API keys to WordPress site

Once you’re done, click on the “Save your Google reCAPTCHA API Keys pair” button to store the API keys.

The last thing you need to do is enable reCAPTCHA by clicking on the toggle button and then click on Save Changes.

Activate Google reCAPTCHA on your site

You can also do basic customization by clicking on the reCAPTCHA Customizer option.

Customize reCAPTCHA appearance

Here you can make changes to the style, size, and alignment of the reCAPTCHA checkbox.

The plugin also has Antispam Settings option which allows you to decide what to do when the plugin detects an unauthorized comment or security breach.

What to do with spam comments

Congratulations, you’ve successfully added reCAPTCHA to your WordPress comment form. You can now check the comment section of your blog posts to confirm that it’s working properly.

Note: the reCAPTCHA checkbox will be displayed only to logged out users, so you will need to either log out or open your website in an Incognito window of your browser to preview reCAPTCHA.

WordPress comment form with reCAPTCHA enabled

We hope this tutorial helped you learn how to add reCAPTCHA to the WordPress comment form of your website.

You may also want to check out our guide on how to lazy load comments in WordPress to improve the page loading time.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Add reCAPTCHA to WordPress Comment Form appeared first on WPBeginner.



Source link