Set up a comment blocklist in WordPress
You can set up a comment blocklist in WordPress, which will automatically move to the Trash section any comments that contain certain keywords, names, URLs, email addresses, or come from IP addresses you specify. This is an effective way to help prevent comment spam.
Note: Comments that are moved to Trash will be deleted automatically after 30 days.
- Sign in to WordPress.
- On the left-side menu, select Settings > Discussion.
- Scroll down to the Disallowed Comment Keys section and enter blocklisted items into the box, one item per line. You can enter keywords, phrases, IP addresses, domains or URLs, usernames, or email addresses.
Note: When a comment contains any of your blocklisted words in its content, author name, URL, email, IP address, or a browser's user agent string, it will be moved to Trash. It will match inside words, so "cat" will match "caterpillar", "educate" and so on.
- Scroll to the bottom of the page and select Save Changes.
Blocklisted comments will now go to the Trash section automatically. To view them, on the left side menu, select Comments and then select Trash.