针对google的asp301转向作弊

想起之前wordpress论坛里有人的.htaccess给人黑了,将pr全转移到另一个网址上,用的就是对google蜘蛛301转向的方法。

今天无聊,研究一下这个作弊方法。

这作弊方法好处是可以将pr全转移到目标站上,而坏处就是被转移站pr清零。因为301是永久重定向,所以就算解除作弊后,seo估计也好不了。当然,对于google发现目标站作弊会不会处理,这个就不清楚了。

入正题,这个作弊方法最主要就是区分google的蜘蛛和一般浏览者的区别,然后分别作出处理:对google蜘蛛用301重定向到目标站,而一般浏览者则不作处理。

首先分析googlebot的http header:

GET / HTTP/1.1
Host: example.com
Connection: Keep-alive
Accept: */*
From: googlebot(at)googlebot.com
User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
Accept-Encoding: gzip,deflate

要区分google蜘蛛,主要看request的User-Agent

整个代码就是

If InStr(Request.ServerVariables (“Http_User_Agent”),” Googlebot”) then
‘接收并检查User-Agent里是否含有字符” Googlebot ”

Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”, “http://august.hk/”
’301重定向蜘蛛

End if

将这段代码加入asp的文件里就行,建议加入到conn.asp之类的。

再强调一次,作弊给google知道后,不知会不会给惩罚的,但可以肯定,被转移站的pr一定清零。

12 thoughts on “针对google的asp301转向作弊

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">