how to allow known web crawlers and block spammers and harmful robots from scanning asp.net website

前端 未结 4 1643
小鲜肉
小鲜肉 2021-02-10 00:05

How can I configure my site to allow crawling from well known robots like google, bing, yahoo, alexa etc. and stop other harmful spammers, robots

should i block particul

4条回答
  •  一向
    一向 (楼主)
    2021-02-10 00:24

    I like to use the .htaccess file, once you have a list of known bots add these lines to the bottom of your file.

    RewriteCond %{HTTP_REFERER} ^http(s)?://([^.]+.)suspectIP.$ [NC,OR]

    RewriteCond %{HTTP_REFERER} ^http(s)?://([^.]+.)suspectURL.com.$ [NC]

    RewriteRule (.*) - [F]

提交回复
热议问题