V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
abelyao
V2EX  ›  问与答

这里有 SAE 的童鞋吗?网站被各家搜索引擎给轮 X 了,怎么破?

  •  1
     
  •   abelyao · Oct 9, 2014 · 4302 views
    This topic created in 4223 days ago, the information mentioned may be changed or developed.
    估计这个域名以前是有网站的,
    现在我绑定到 SAE 上面,
    百度 / Google / Bing 等几个搜索引擎的蜘蛛,每天访问几百次特定页面,
    消耗了我很多云豆,
    有什么办法可以屏蔽吗?

    21 replies    2014-10-09 20:23:54 +08:00
    LemonZest
        1
    LemonZest  
       Oct 9, 2014
    robots.txt
    abelyao
        2
    abelyao  
    OP
       Oct 9, 2014
    @sunshower 就访问记录来看,只有 bing 偶尔才访问一次 robots.txt
    dong3580
        3
    dong3580  
       Oct 9, 2014
    @sunshower
    更新robots.txt基本不起作用,试过整整两个月之后,世界才清净了。
    试了试写邮件反馈,也是没用的。
    唯一的方法不知道是不是暂时屏蔽他们的ip.
    loading
        4
    loading  
       Oct 9, 2014
    你这个url有东西吗?返回403
    kenjey01
        5
    kenjey01  
       Oct 9, 2014
    每天几百次 会消耗很多云豆吗? 404基本没有多少流量消耗
    abelyao
        6
    abelyao  
    OP
       Oct 9, 2014
    @dong3580 他们的 IP 太多了,哎!
    abelyao
        7
    abelyao  
    OP
       Oct 9, 2014
    @loading 没有对应的 url,返回 403 可以让搜索引擎歇一歇吗?
    abelyao
        8
    abelyao  
    OP
       Oct 9, 2014
    @kenjey01 云豆目前来说是足够的,但是占了几百页日志,严重影响我分析网站的一些情况…
    ab
        9
    ab  
       Oct 9, 2014
    没有这个问题...
    mornlight
        10
    mornlight  
       Oct 9, 2014
    robots.txt 肯定会有用的,但是搜素引擎会缓存robots的内容,你更新后很久他们才跟着更新。
    另外,如果针对百度的话可以到百度站长平台里试一试,能调节Spider频率
    abelyao
        11
    abelyao  
    OP
       Oct 9, 2014
    @mornlight 暂时先添加 robots.txt 了
    typcn
        12
    typcn  
       Oct 9, 2014
    @abelyao 为毛要用日志分析..... 用第三方分析就完了,正好还能过滤不支持 js 的 bot,话说我以前也是用的sae bae 后来感觉性能太渣就开始用 vps 了
    Execution
        13
    Execution  
       Oct 9, 2014
    花时间去整这些什么e的时间,够撸主上几个性价比vps了,撸的还带劲。
    dong3580
        14
    dong3580  
       Oct 9, 2014
    @abelyao
    我想了想一个解决方法,前提如果你的代码使用MVC方式写的,可以在路由中加入全局代码,404的话跳转到某个静态页面。
    截一段我的代码给你参考。
    ```C#
    protected void Application_Error(object s, EventArgs e)
    {
    Exception ex = Server.GetLastError();
    if (ex.GetType().Name == "HttpException")
    {
    HttpException exception = (HttpException)ex;
    if (exception.GetHttpCode() == 404)
    {
    Response.StatusCode = 404;
    Response.Redirect("/Home/Error?code=PageNotExist");
    }
    }
    Server.ClearError();
    }
    ```

    如果使用了IIS部署的,直接可以在iis设置里面加上404的跳转地方,这样就不会销耗什么流量了。
    (猜想其他部署的方式也可以实现吧)
    knightluffy
        15
    knightluffy  
       Oct 9, 2014
    用https吧。。估计只有Google的蜘蛛能进了。。
    zts1993
        16
    zts1993  
       Oct 9, 2014
    SAE防火墙啊。。。
    我也被艹过。。。好惨的说。、
    mornlight
        17
    mornlight  
       Oct 9, 2014
    @knightluffy SAE 的自定义域名能使用https?我前几天还在微博上跟SAE的架构负责人吐槽过
    abelyao
        18
    abelyao  
    OP
       Oct 9, 2014
    @zts1993 防火墙研究了半天,不懂如何屏蔽搜索引擎啊,请指点一下!
    sandideas
        19
    sandideas  
       Oct 9, 2014 via Android
    @abelyao 把所有爬虫ip拉黑名单
    zts1993
        20
    zts1993  
       Oct 9, 2014
    @abelyao 屏蔽p
    zts1993
        21
    zts1993  
       Oct 9, 2014
    屏蔽ip段
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2467 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 09:32 · PVG 17:32 · LAX 02:32 · JFK 05:32
    ♥ Do have faith in what you're doing.