2011-11-27 64 views
3

昨天googlebot導致我的應用程序超過讀取配額。如何禁用Googlebot?謝謝。如何在Google App Engine中停用Googlebot?

更新

我加

- url: /robots.txt 
    static_dir: robots 

app.yamlas explained here並創建了robots.txt文件的目錄 「機器人」,但網址http://www.example.com/robots.txt不起作用。我究竟做錯了什麼?

+0

你應該將上述一些趕上機器人路線像''/.*你可能在你'app.yaml'所有航線 – systempuntoout

+0

是的,它高於'/ *' – Zeynel

+0

@systempuntoout:對不起,'http:// localhost:8086/robots/robots.txt'工作。這是怎麼回事? – Zeynel

回答

5

移到高於/.*捕捉所有路線和修改app.yaml與機器人路線動作會影響您的應用程序的SERP(谷歌將取消索引你的應用遲早)

+1

完美,謝謝。 – Zeynel

5

添加robots.txt file。下面是一個簡單的阻斷是聽你的所有機器人:

- url: /robots.txt 
    static_files: robots/robots.txt 
    upload: robots/robots.txt 

記住,這樣的:

User-agent: * 
Disallow:/
+0

好的,謝謝。你知道只要放入應用程序目錄就足夠了嗎? – Zeynel

+1

@Zeynel:當你訪問'http:// www.example.com/robots.txt'時,你需要這樣做,你會得到這個文件。 (顯然,用你的域名取代'www.example.com')我不記得在App Engine中如何做到這一點,但它應該非常簡單。 – icktoofay

+1

@Zeynel:如果您使用的是Python,[請參閱此處](http://code.google.com/appengine/docs/python/gettingstarted/staticfiles.html)。如果您使用的是Java [請參閱此處](http://code.google.com/appengine/docs/java/gettingstarted/staticfiles.html)。 Google似乎沒有任何有關Go的靜態文件的文檔。 – icktoofay