首页/黑帽知识/正文
黑帽SEO手法:PHP判断用户UA给搜索引擎和用户展示不同页面

 2021年12月09日  阅读 778  评论 0

摘要:一种黑帽常用的SEO手段判断来路是搜索蜘蛛就让蜘蛛看到全部的页面代码,网上有很多垃圾蜘蛛 直接全部屏蔽就行 蜘蛛方面 只保留 百度 搜狗 360 就可以了 其他比如 谷歌一类的蜘蛛 爬行量 相当大 但是没有意义 因为国内的环境问题 根本就来不了几个流量 不划算 不如屏蔽掉垃圾蜘蛛列表acoonbot ahrefsbot alexa toolbar apachebench applebot asktbfxtv blexbot chinasospider compspybot co

一种黑帽常用的SEO手段

判断来路是搜索蜘蛛就让蜘蛛看到全部的页面代码,

网上有很多垃圾蜘蛛 直接全部屏蔽就行 蜘蛛方面 只保留 百度 搜狗 360 就可以了 其他比如 谷歌一类的蜘蛛 爬行量 相当大 但是没有意义 因为国内的环境问题 根本就来不了几个流量 不划算 不如屏蔽掉

垃圾蜘蛛列表
acoonbot ahrefsbot alexa toolbar apachebench applebot asktbfxtv blexbot chinasospider compspybot coolpadwebkit crawldaddy curl digext dotbot easouspider ec2linkfinder edisterbot elefent exabot ezooms feeddemon feedly heritrix httpclient ichiro indy library jaunty java jikespider jorgee lightdeckreports bothttp://mail.rumicrosoft url control mj12bot msnbot-media obot perl psbot purebot python python-urllib scrapy seokicks-robot siteexplorer spbot spiderman swebot swiftbot teleport teleportpro turnitinbot turnitinbot-agent universalfeedparser wangidspider wbsearchbot webdup wget wotbox wsanalyzer xbfmozilla xenu yandexbot yottaa yunguance yyspider zmeu



如果判断来路是真实的用户则跳转到注册页或者其他页面,既能达到想要的效果,又能做良好的seo优化。

php
$http = false;
$http1 = $_SERVER['HTTP_USER_AGENT'];if(strpos($http1, 'Googlebot') !== false){
$http = true;} else if(strpos($http1, 'Baiduspider') >0){
$http = true;} else if(strpos($http1, 'Yahoo! Slurp') !== false){
$http = true;} else if(strpos($http1, 'msnbot') !== false){
$http = true;} else if(strpos($http1, 'Sosospider') !== false){
$http = true;} else if(strpos($http1, 'YodaoBot') !== false || strpos($http1, 'OutfoxBot') !== false){
$http = true;} else if(strpos($http1, 'Sogou web spider') !== false || strpos($http1, 'Sogou Orion spider') !== false){
$http = true;} else if(strpos($http1, 'fast-webcrawler') !== false){
$http = true;} else if(strpos($http1, 'Gaisbot') !== false){
$http = true;} else if(strpos($http1, 'ia_archiver') !== false){
$http = true;} else if(strpos($http1, 'altavista') !== false){
$http = true;} else if(strpos($http1, 'lycos_spider') !== false){
$http = true;} else if(strpos($http1, 'Inktomi slurp') !== false){
$http = true;} else if(strpos($http1, 'googlebot-mobile') !== false){
$http = true;} else if(strpos($http1, '360Spider ') !== false){
$http = true;} else if(strpos($http1, 'haosouspider') !== false){
$http = true;} else if(strpos($http1, 'Sogou News Spider') !== false){
$http = true;} else if(strpos($http1, 'YoudaoBot') !== false){
$http = true;} else if(strpos($http1, 'bingbot') !== false){
$http = true;} else if(strpos($http1, 'YisouSpider') !== false){
$http = true;} else if(strpos($http1, 'ia_archiver') !== false){
$http = true;} else if(strpos($http1, 'EasouSpider') !== false){
$http = true;} else if(strpos($http1, 'JikeSpider') !== false){
$http = true;} else if(strpos($http1, 'Sogou blog') !== false){
$http = true;}if($http == false){
header("Location: http://www.xxxxx.com/");exit();}?>

以上代码包含了各大主流搜索引擎的蜘蛛,把其中www.xxxxxx.com替换为你的网址即可,这段代码可以放在php网页中,或者网站的头部文件中即可。

。转载请注明来源地址:黑帽SEO http://www.heimao.wiki 专注于SEO培训,快速排名
黑帽WiKi_黑帽百科(www.heimao.wiki),8年黑帽SEO优化技术,黑帽seo快速排名,黑帽seo技术培训学习,黑帽SEO快速排名程序、泛目录寄生虫技术,赠送免费黑帽SEO视频教程

黑帽SEO技术,网站快速排名,蜘蛛池加速收录,目录程序定制)

扫一下添加微信:



版权声明:本文为 “黑帽百科” 原创文章,转载请附上原文出处链接及本声明;

原文链接:https://www.heimao.wiki/post/48720.html

标签:

发表评论:

关于我们
黑帽百科:黑帽seo百科,黑帽seo技术学习培训分享,黑帽SEO快排程序分享,定制。 SEO快速排名收录学习 老师qq:25496334
扫码关注
联系方式
全国服务热线:
地址:新加坡 - 市中心(Singapore City)乌节路
Email:hack66666@foxamil.com
邮编:
Copyright Your 黑帽百科.|网站地图.Some Rights Reserved.