Master Your WordPress Comments: Get Notified and Block Spam

Engaging with your audience through comments is a fantastic way to build a community around your WordPress site. But staying on top of the conversation requires an effective system. You need to know when new comments arrive and, just as importantly, how to keep spam from cluttering your discussions.

This guide will show you how to set up email notifications for new comments and implement powerful strategies to block those annoying spam comments, especially the ones that only contain advertising links.

Part 1: How to Get Email Notifications for New Comments

By default, WordPress is already set up to notify the site administrator of new comments. However, you might want to customize these settings or have notifications sent to a different email address. Here’s how to do it.

Using Native WordPress Settings (The Easy Way)

This is the simplest method and is built right into your WordPress dashboard.

Step 1: Navigate to Discussion Settings

From your WordPress admin dashboard, go to Settings > Discussion. This page controls everything related to comments on your site.

Step 2: Configure Email Notifications

Scroll down to the section titled “Email me whenever.” You will see two options:

  1. Anyone posts a comment: Check this box if you want an email for every single comment that is submitted on your site.
  2. A comment is held for moderation: Check this box to receive an email only when a comment needs your approval before it goes live. This is highly recommended, as it lets you filter spam without cluttering your inbox for every legitimate comment.

For most users, checking both boxes provides the best balance of awareness and control.

Step 3: Check Your Admin Email Address

The notifications will be sent to the administrator’s email address. To check or change this, go to Settings > General. Make sure the email address in the “Administration Email Address” field is correct. If you change it, WordPress will send a confirmation email to the new address before the change takes effect.

After configuring these settings, click “Save Changes” at the bottom of the page. You’re all set!

Part 2: How to Block Spam Comments Effectively

Unsolicited ads, especially those using short URLs, are a common nuisance. Manually deleting them is time-consuming. Here are several methods, from simple to advanced, to stop them in their tracks.

Method 1: Enable Comment Moderation

The first line of defense is holding comments for your approval. This gives you complete control over what appears on your site.

  1. Go back to Settings > Discussion.
  2. Find the section “Before a comment appears.”
  3. Check the box for “Comment must be manually approved.”

Now, no comment will appear on your site until you approve it from the “Comments” section of your dashboard. This single setting can prevent nearly all public-facing spam.

Method 2: Use an Anti-Spam Plugin (Highly Recommended)

Plugins are the most powerful and automated way to fight spam. They use advanced algorithms and global databases to identify and block spam comments before they even reach your moderation queue.

Akismet is the most popular anti-spam plugin and comes pre-installed with WordPress.

Step 1: Activate Akismet

  1. From your dashboard, go to Plugins > Installed Plugins.
  2. Find Akismet Anti-spam and click “Activate.”

Step 2: Set Up Your Akismet API Key

  1. After activation, you’ll see a banner prompting you to set up your Akismet account. Click the button.
  2. You will be taken to the Akismet website to choose a plan. For personal blogs, you can often get a free API key by choosing the “Personal” plan and using the “Name Your Price” slider.
  3. Once you have your API key, return to your WordPress dashboard, navigate to the Akismet settings, and paste the key.

Akismet will now automatically filter incoming comments. Suspected spam will be sent to its own spam folder, which you can review or empty.

Method 3: Create Custom Filters to Block URL Spam

You can tell WordPress to automatically hold or trash comments that contain specific keywords, or in this case, a certain number of links. This is especially effective against comments that are just a link and nothing else.

  1. Navigate to Settings > Discussion.
  2. Scroll down to the “Disallowed Comment Keys” text box.
  3. This field allows you to add words, phrases, IP addresses, or URLs that will be automatically sent to the trash. While you can add common short URL domains (like bit.ly), spammers constantly change them.

A more effective approach is using the “Comment Moderation” box just above it. This box will hold comments in the moderation queue if they contain certain content.

To target the short URL spam problem, set the link threshold:

  • In the “Comment Moderation” box, find the setting that says “Hold a comment in the queue if it contains __ or more links.”
  • Change the number to 1.

Since most legitimate comments don’t contain links (and if they do, you’d want to review them anyway), this single setting is incredibly powerful. It will automatically hold any comment containing even one hyperlink, allowing you to easily spot and delete the robotic link-only spam.

Click “Save Changes,” and your new defensive wall is active. By combining email notifications with these spam-blocking techniques, you can foster a healthy, engaging comment section without the headache of constant spam.

Tags: