2008-08-23

How to integrate robots.txt and favicon.ico in Appengine

To avoid nasty warnings regarding missing favicon.ico and robots.txt, you can try to modify your app.yaml as followed:
application: sol
version: 1
runtime: python
api_version: 1

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

- url: /favicon.ico
static_files: static/favicon.ico
upload: static/favicon.ico

- url: .*
script: main.py


Afterwards you have to create a "static" folder in your application root and put favicon.ico and robots.txt into this directory. The sequence of the entries in app.yaml is important and the example above would not work if you change this sequence.