Vote link is executed by search engines

bjacob - October 17, 2008 - 17:40
Project:Plus 1
Version:6.x-2.6
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Hi there,

I've activated anonymous voting. In the table votingapi_vote I've found at least 40 voting entries with nearly the same ip address: 66.249.71.xxx. I've looked it up at http://www.arin.net/whois/ and found out that this was the Google bot. We should add rel="nofollow" to the voting link or something like this.

Thanks, Bjoern

#1

Chill35 - October 17, 2008 - 20:01

That is a great idea. I will add the attribute now. Brb.

#2

Chill35 - October 17, 2008 - 19:57
Assigned to:Anonymous» Chill35

Actually this will not work.

From Wikipedia

The nofollow attribute value is not meant for blocking access to content or preventing content to be indexed by search engines. The proper methods for blocking search engine spiders to access content on a website or for preventing them to include the content of a page in their index are the Robots Exclusion Standard (robots.txt) for blocking access and on page Meta Elements that are designed to specify on an individual page level what a search engine spider should or should not do with the content of the crawled page.

So what you have to do is edit the robots.txt file that comes with Drupal.

Add these lines:

Disallow: /plus1/vote/
Disallow: /?q=plus1/vote/

Report back on this, please. If that works, I will add it to the module's documentation.

#3

Chill35 - October 19, 2008 - 23:10

This might be a long term check of course. Please try it and report back in 2-3 weeks. That would be awesome!

Not many people use anonymous voting.

#4

timmillwood - November 11, 2008 - 20:36

Any progress on this, I have been having the same problem on http://blog.to.it now that I have enabled anonymous voting.

#5

Chill35 - November 12, 2008 - 00:11

timmillwood, add the 2 lines to robots.txt. It really should fix the problem. And please report back if it does. I do not have a live site that uses plus 1. I cannot test this.

#6

timmillwood - November 12, 2008 - 08:34

I have added those to the robot.txt but guess it will take a while to filter through.

Will that stop the listings on http://www.google.co.uk/search?q=site%3Ablog.to.it ?

#7

Chill35 - November 12, 2008 - 14:58

Yes.

#8

voxpelli - February 25, 2009 - 10:56

Robots.txt and nofollow isn't the right solutions - the right solution is to not violate the HTTP-specification of the GET-method and submit votes through POST-request instead. A GET is not allowed to have any impact on the state of the data and letting a GET have that not only makes search engine robots trigger but can also have weird results with caches and similar.

#9

asak - July 1, 2009 - 19:29

Any progress on this issue...?

#10

voxpelli - July 1, 2009 - 20:31

I have coded in solutions to this in the themes for the sites I'm using Plus1 on - should be fairly easy to make a patch out of it when I get time.

If any one else has a solution - please don't let that stop you from presenting it though.

#11

voxpelli - February 9, 2010 - 09:09
Title:Seams like vote link is executed by search engines» Vote link is executed by search engines
Version:6.x-2.4» 6.x-2.6
Category:task» bug report
Assigned to:Chill35» Anonymous
Status:active» needs review

Here's a patch that changes the theme function as well as make it more customizable.

The change to the theme layer is that the link is now a button instead and the form POST:s the votes to the backend - which means that no search engines will index it and no cache will stop it from being processed.

This patch is dependent on #696500: Variable misused used to store state.

AttachmentSize
plus1_theming_improvement.patch 9.79 KB
 
 

Drupal is a registered trademark of Dries Buytaert.