50

I am trying to develop on Google App Engine and in the list of the errors displayed in the admin console I always see the following:

/favicon.ico

i read the documentation , added a new folder called static and added this in my app.yaml:

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

but even now I'm getting the same error...

Deniss T.
  • 2,526
  • 9
  • 21
vignesh
  • 973
  • 2
  • 8
  • 14

5 Answers5

69

This entry should be placed before the entry for the main handler, like:

- url: /favicon.ico
  static_files: media/img/favicon.ico
  upload: media/img/favicon.ico

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

- url: .*
  script: main.py

The entries are processed in order of apperance and first one that matches wins.

ChrisF
  • 134,786
  • 31
  • 255
  • 325
zgoda
  • 12,775
  • 4
  • 37
  • 46
9

If you are doing this in Java, I got rid of the error by putting a blank "favicon.ico" file in the "war" directory.

If you want to make your own quick and ugly "favicon.ico" file, this website was super easy to use: http://www.favicon.cc/

Chris Dutrow
  • 48,402
  • 65
  • 188
  • 258
  • In java, I added the ico file and I added to my appengine-web.xml file . That finally got rid of the not found error. – rickz Apr 15 '15 at 16:18
5

For your application, favicon.ico should be a static image. You can upload a favicon.ico file with your application, and in your app.yaml file configure your application to serve the image when the url /favicon.ico is requested. Below is an example entry in your app.yaml file for /favicon.ico. We assume you include the favicon.ico file in the directory path static/images:

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

is written here

x4tje
  • 1,633
  • 1
  • 15
  • 17
  • 1
    as i hav mentioned above i have added the code in the app.yaml there is a folder called static and has a favicon.ico file inside... the image is a 16x16 image... but still it does not recognize or sumthing...i keep getting 404 – vignesh May 20 '09 at 19:54
0

I am using this snippet in a GAE app configuration:

handlers:

  - url: /(.*\.(ico|png|webmanifest))$
    static_files: faviconfiles/\1
    upload: faviconfiles/.*\.(ico|png|webmanifest)$

I then put the corresponding set of files (these days if you seriously want to set a "favicon" it's a set of files incl. e.g. apple-touch-icon.png) into the ./faviconfiles directory next to my app.yaml.

Dr. Jan-Philip Gehrcke
  • 33,287
  • 14
  • 85
  • 130
0

all the answers above do work but only in Production !!

specifying the handler in your app.yaml file is correct.

Deploy it and test in production. It should work.

However and for some reasons which I still don't quite understand, you will always get a 404 when you try this on your local dev server.

Erwan
  • 3,733
  • 30
  • 25