I run an apache2 server with some vhosts (50-100). A lot of these do not have favicon.ico files, cluttering the error logs with messages like

[Thu Mar 21 14:07:40 2013] [error] [client 84.xx.xx.xx] File does not exist: /var/www/somevhost/public_html/favicon.ico

Is there a way to disable logging of these errors if the file is favicon.ico? I've read this question but the problem is that for that to work all vhost files need to be altered, which isn't very convenient.

2 Answers 2


I do:

Redirect gone /favicon.ico
RedirectMatch gone ^/apple-touch-icon

Apache always logs 404s as errors, even from a Redirect, and even if you handle them using an ErrorDocument. But it doesn't for 410 (gone), which seems an equally acceptable description of the situation.


Creating a 0-byte file named favicon.ico should end the flow of 404 errors.

  • It will for now, but as soon as a new vhost is added or the user changes the website the errors will start again, so not really a permanent solution.
    – dtech
    Commented Apr 18, 2013 at 20:50
  • Well, I guess it won't save a lot of space, but you could share the path of the 0-byte file between virtual servers.
    – U. Windl
    Commented Jan 3, 2023 at 8:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .