Leo*_*eel 2 python google-app-engine
我注意到我的 Google App Engine 网站正在被很多机器人(例如 Baido 和 Ahrefs)抓取,它们正在占用我的所有带宽和数据存储读取操作。
我知道在常规的自托管网站上,我会将 robots.txt 放入我的基本文件夹中,但是我到底如何告诉机器人不要在 Google App Engine 上抓取我的网站呢?我正在运行 python 和 jinja 2,如果这有什么区别的话。
谢谢。
在你的app.yaml
- url: /robots.txt
static_files: static/robots.txt
upload: static/robots.txt
Run Code Online (Sandbox Code Playgroud)
然后,只要您static/robots.txt的项目已经完成,就可以开始了。