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 |
Jump to:
Description
I allow anonymous users to vote on my site. Is there a way to prevent web bots from casting votes?

#1
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
Actually the Google bot does follow links with attr: rel="nofollow". See http://en.wikipedia.org/wiki/Nofollow .
#3
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
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
for google and any other bots that obey the robot.txt it should work yes.
#6
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-votein to robots.txt but it is still voting. I just noticed that I need to add:
disallow /?q=drupalit/count-voteHopefully 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
@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
Are there any other voting modules that exhibit the same behavior ? if not, what are those modules doing to avoid the issue?
#10
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.