Google Bot Casts Votes

sicjoy - October 22, 2007 - 15:04
Project:DrupalIt
Version:5.x-1.4-beta2
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I allow anonymous users to vote on my site. Is there a way to prevent web bots from casting votes?

#1

sicjoy - October 22, 2007 - 15:16

It seems adding the attribute: rel="nofollow" to the link will prevent "obedient" bots from voting. As of 2005 the Google bot honors this attribute.

#2

sicjoy - October 22, 2007 - 15:47

Actually the Google bot does follow links with attr: rel="nofollow". See http://en.wikipedia.org/wiki/Nofollow .

#3

sicjoy - October 24, 2007 - 17:53

Continuing the conversation with myself: (possible sign of insanity)

The best fix for this, imho, would be to use Javascript/jQuery to create the vote link, rather than the a href markup. This should prevent the bots from voting.

#4

sicjoy - October 25, 2007 - 01:19

OK - How about this:

Add the lines

Disallow: /drupalit/count-vote/
Disallow: /?q=drupalit/count-vote/

to the robots.txt file.

Anybody know if this will work?

#5

VM - October 25, 2007 - 01:32

for google and any other bots that obey the robot.txt it should work yes.

#6

stuartward - April 23, 2008 - 12:08

I have had a problem with spiders voting on my site with drupalit. I changed the permissions to only allow voting if logged in so I was then getting access errors in the logs for spider votes. They are all coming from:

65.55.213.86 is livebot-65-55-213-86.search.live.com.

I have put

disallow /drupalit/count-vote

in to robots.txt but it is still voting. I just noticed that I need to add:

disallow /?q=drupalit/count-vote

Hopefully this will stop it and allow me to allow anonymous votes. I will report back if it fixes this, but I have herd that the M$ live search often ignores robots.txt directives.

#7

roychri - September 19, 2008 - 03:49

@sicjoy: Your proposition to get js/jquery to create the vote link would prevent users without javascript from using the drupalit module.

Wait a sec, it already does not work when you have js disabled.
All I get is the new vote value. I guess jquery uses whatever that url returns in order to update that widget.
So this module does not work properly without js enabled.

I could submit a patch that would allow non js users to use this module, but that would not solve the problem of bots voting.

Any ideas on how to allow this module to work even without JS and still not allow bots to vote?

Maybe we simply add to the instructions of this module:

To prevent bots from voting on your nodes, add the following to your robots.txt file:

Disallow: /drupalit/count-vote/
Disallow: /?q=drupalit/count-vote/

Suggestions?

#9

VM - September 19, 2008 - 12:59

Are there any other voting modules that exhibit the same behavior ? if not, what are those modules doing to avoid the issue?

#10

roychri - September 19, 2008 - 16:13

I was wondering the same thing. I do not have the answer to that. Maybe searching thru the other voting module's issues would answer that question.

 
 

Drupal is a registered trademark of Dries Buytaert.