昨天googlebot導致我的應用程序超過讀取配額。如何禁用Googlebot?謝謝。如何在Google App Engine中停用Googlebot?
更新
我加
- url: /robots.txt
static_dir: robots
我app.yaml
as explained here並創建了robots.txt
文件的目錄 「機器人」,但網址http://www.example.com/robots.txt
不起作用。我究竟做錯了什麼?
昨天googlebot導致我的應用程序超過讀取配額。如何禁用Googlebot?謝謝。如何在Google App Engine中停用Googlebot?
更新
我加
- url: /robots.txt
static_dir: robots
我app.yaml
as explained here並創建了robots.txt
文件的目錄 「機器人」,但網址http://www.example.com/robots.txt
不起作用。我究竟做錯了什麼?
添加robots.txt
file。下面是一個簡單的阻斷是聽你的所有機器人:
- url: /robots.txt
static_files: robots/robots.txt
upload: robots/robots.txt
記住,這樣的:
User-agent: *
Disallow:/
好的,謝謝。你知道只要放入應用程序目錄就足夠了嗎? – Zeynel
@Zeynel:當你訪問'http:// www.example.com/robots.txt'時,你需要這樣做,你會得到這個文件。 (顯然,用你的域名取代'www.example.com')我不記得在App Engine中如何做到這一點,但它應該非常簡單。 – icktoofay
@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
你應該將上述一些趕上機器人路線像''/.*你可能在你'app.yaml'所有航線 – systempuntoout
是的,它高於'/ *' – Zeynel
@systempuntoout:對不起,'http:// localhost:8086/robots/robots.txt'工作。這是怎麼回事? – Zeynel