Guest Posted November 19, 2016 Share Posted November 19, 2016 Hi Im trying to get rid of Baidu bot and wondering which would be the best way this RewriteEngine OnRewriteCond %{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 More sharing options...
ecommunlimited Posted November 20, 2016 Share Posted November 20, 2016 @@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 More sharing options...
Guest Posted November 20, 2016 Share Posted November 20, 2016 @@ecommunlimited Hi Bill Many thanks Will give it a go. Cheers Grandpa Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 20, 2016 Share Posted November 20, 2016 @@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 More sharing options...
ecommunlimited Posted November 20, 2016 Share Posted November 20, 2016 @@grandpaj I made a mistake it's not Order Allow,DenyDeny from all It is Order allow,deny allow 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 Sorry, I was hurrying. Take care Bill Link to comment Share on other sites More sharing options...
♥14steve14 Posted November 21, 2016 Share Posted November 21, 2016 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.