How can I stop requests for favicon.ico without having a favicon.ico? It wastes resources serving a 404 and fills up logs with 404s. Right now I put in a dummy favicon.ico file but I would prefer a method of just telling browsers don't request favicon.

  • 4
    Just out of curiosity, any reason you don't want to use a blank image or something similar?
    – John Conde
    Nov 24, 2011 at 16:56
  • This is a browser implementation detail and it's annoying still today what with data URIs and all. Maybe as SVG favicons gain more widespread adoption these superfluous requests will start to ease up when link icons are present in the document.
    – vhs
    Aug 26, 2018 at 13:54

2 Answers 2


You haven't specified a web server however you appear to be involved in .net so I'm going to assume it's IIS

In which case you can filter your logs using something like this http://learn.iis.net/page.aspx/692/advanced-logging-for-iis---log-filtering/

You can do the same on most servers

You can't actually stop browsers requesting the image. However if you do have a favicon it can be cached by the browser which can reduce the number of requests coming in.


You can block favicon.ico requests from the browsers using the rewrite module for IIS. Basically you must install the module and activate it. Then you must create a rule in your web.config of your site or use the GUI on IIS Admin for creating it.

You can get more info there: http://www.iis.net/download/urlrewrite http://learn.iis.net/page.aspx/467/using-failed-request-tracing-to-trace-rewrite-rules

And for the rule, google for something like "rewrite favicon.ico" You will get plenty of hits from the Apache original version of the module, but there also are a bunch of people doing translations you can get on.

Hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.