Prevent spam comments

I have a page where registered users can post comments. I want users to not post comments at the same time to prevent spam. For this purpose, I want a 30 second interval between comments (should I keep time in the session?), Also if the user sends 10 comments within 5 minutes, reCaptcha should be turned on (and reset the comment counter to the session). Is this approach approved?

+4
source share
4 answers

A session may be a good idea. However, I think that many bots do not allow cookies, so the sessions are not respected.

Posting 10 successful comments is enough for most spammers - after that, reCaptcha just annoys active users.

I highly recommend trying Akismet . This is incredibly good for spam comments.

+1
source

Well, I think the answer to all these comments is SPAM: FLASH comment box
I mean, captcha is just annoying ... I would never leave a comment there where you should have this captcha thingie. I would suggest something like: flexi comments or something ...

+1
source

You should also ensure that you use the rel = "nofollow" attribute for any html binding tags that you allow end users yourself to make spam less attractive. rel = "nofollow" tells search engines to ignore the link and, therefore, does not allow the spammer to collect, for example. google page rank of spam comment links on your site.

0
source

Saving the "last sent" time, and the number in the last 5 minutes should not be such a bad idea, as if you could publish only every 30 seconds, 10 minutes is a maximum of 20 messages. You can really save this as part of the session, as the data can be recovered from the database at login (in case of a session break)

0
source

Source: https://habr.com/ru/post/1346446/


All Articles