WordPress has a comment feature that allows you to interact with your readers. However, not all comments are worthy to be displayed on your site. You should not accept spam comments on your site. Is there a way to block spam comments on WordPress?
Plugins like Akismet and CleanTalk might can assist you in combating spam comments, but spammers might also have thousands of tricks to get through the blocking mechanisms of those plugins. Your hosting provider might offer a feature to block spam comments, but WordPress itself also allows you to prevent spam comments by certain parameters.
To prevent spam comments on WordPress you can go to Settings -> Discussion and make some settings right there. You can, for instance, instruct WordPress to hold a comment that contains more than two links. Or, you can also tell WordPress to automatically close comments on an article after several days of the publication date.
One of the common ways to prevent spam comments on WordPress is manually approving the comments before they are displayed on the comment section of your article. But, this method can be exhausting. WordPress offers a smarter way to automatically block spam comments and send them to the trash folder.
How to automatically send spam comments to the trash folder on WordPress
On the Discussion Settings page of WordPress, you will see a Comment Blacklist section. This section allows you to automatically send a spam comment to the spam folder based on a certain parameter, including:
- Word or phrase
- Name
- URL
- IP
You can simply add the parameters you want to use to block the comments on the available box.

WordPress reads the content on this box sequentially from top to bottom and you need to enter one parameter per line. Don’t forget to click the Save Changes button once you entered the parameters.
How to block an IP address from commenting on WordPress
Blocking the IP addresses of the spammers can be a great idea to prevent them from commenting. To block an IP address on WordPress, you can simply enter the IP address you want to block on the box of the Comment Blacklist section we have just covered above. But how to find the IP address of the spammer?
To see the IP addresses of the spammers, you can go to the Comments menu.

You can find the IP address of each comment on the Author section.

You can try several parameter combinations to block the spam comments on your WordPress site.