Why does the favicon sometimes not show up and generate "page not found" errors, and other times does show up As the question implies, on occasion Drupal's log is showing that the favicon is not found. Indeed, it does not show in the browser tab or address bar. At other times, even within the same surfing session, it does show up.

Why does it do this and how can I prevent it so that the favicon will always show?

I am using version Drupal 7.22. with a custom subtheme and an admin theme (Stark). 

My favicon is set in the subtheme theme configuration at sites/default/files/images/favicon.ico and that is located there as I have checked via FTP.

The log shows the browser is looking in example.com/favicon.ico. 

The custom subtheme I use has &lt;link rel="shortcut icon" href="http://example.com/sites/default/files/images/favicon.ico"; type="image/vnd.microsoft.icon" /&gt; in the source code and the admin theme (Stark) uses &lt;link type="image/vnd.microsoft.icon" href="http://example.com/misc/favicon.ico"; rel="shortcut icon"&gt; and this file also exists in that location (not actually using example.com, of course).

Drupal is using clean URLs.

The web server is Apache on Debian Linux.

Thank you.
Some browsers search for favicon under http://example.com/favicon.ico without checking. But they are minority now.

Most respect:

&lt;link rel="icon" href="http://example.com/img/icon.png"&gt;


as described by W3C.

If your site tries to use &lt;link&gt; approach but fails on some pages, like admin pages rendered using different template, and you do not have favicon.ico in default location, you will get exactly described effects.

If browser is looking for  http://example.com/favicon.ico when you have proper &lt;link rel="shortcut icon"&gt; it is a browser problem, not yours. It means browser (or at least that part of it's code) is outdated, unless it looked under correct URI first and got another error, but then you would see two errors in log, one for right place, second for outdated one. In Mozilla's queue there is a number of reports about improper favicon detection by FireFox - in example this one. It shows how even modern browsers can sometimes fall back to old methods.