Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Baidu


Guest

Recommended Posts

Hi

 

Im trying to get rid of Baidu bot and wondering which would be the best way

this

 

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} Baiduspider [NC]
RewriteRule .* - [F,L]

 

or this

BrowserMatchNoCase "Baiduspider" bots

in htaccess file

 

I have view counter installed but at the moment it doesnt seem to stop Baidu although I have banned it, Maybe Im not using View Counter correctly

 

or is there a better way.

 

Many thanks

Grandpa

Link to comment
Share on other sites

@@grandpaj This works for me.

 

In .htaccess

RewriteEngine onRewriteCond %{HTTP_USER_AGENT} ^.*MJ12bot [NC,OR]RewriteCond %{HTTP_USER_AGENT} ^.*Baidu [NC]RewriteRule .* - [L,F]
Order Allow,DenyDeny from all# Block access to Baiduspider deny from 180.76.5.0/24 180.76.6.0/24 123.125.71.0/24 220.181.108.0/24

In robot.txt

 

#Baiduspider

User-agent: Baiduspider

Disallow: /

 

#Majestic-12

User-Agent: MJ12bot

Disallow: /

 

Take care

 

Bill

Link to comment
Share on other sites

@@grandpa View Counter will just ban the particular IP, range of IP's or domain name, depending upon what is selected. Banning a troublesome search engine can be different since they usually don't follow the robots file rules and have many IP's. So besides blocking the IP ranges for them, you should also by domain name by entering Baidu.com in the block IP box.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

If you google (other search engines are available) for something like 'htaccess ban bad bots' you will find lots of information on how to block many bots that do not follow the robots.txt. If you are not having trouble with them all, you do not need to block them all as the list is very long.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...