How to prohibit the configuration method of web crawler acquisition by Apache

Source: Internet
Author: User

Apache ban web crawler, in fact, very simple, as long as the following code configuration to the Apache httpd.conf file in the location, it can be.

<location/>
Setenvifnocase user-agent "Spider" Bad_bot
Browsermatchnocase Bingbot Bad_bot
Browsermatchnocase Googlebot Bad_bot
Order Deny,allow
#下面是禁止soso的爬虫
Deny from 124.115.4. 124.115.0.64.69.34.135 216.240.136.125 218.15.197.69 155.69.160.99 58.60.13. 121.14.96.58.60.14. 58.61.164.202.108.7.209
Deny from Env=bad_bot
</Location>


This is forbidden for all reptiles containing spider characters.

If you want to specifically prohibit the crawler, change to the exact matching reptile string, if bingbot, Googlebot, etc.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.