Apache Remove Favicon.ico Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow
Prevent Favicon.ico Requests
the company Business Learn more about hiring developers or posting ads with us Stack favicon.ico 404 error Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of favicon.ico not found error 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Do I need to have a favicon on my site? How do I get rid of the errors
Favicon.ico 404 (not Found)
I see in my apache log? up vote 13 down vote favorite 2 I keep seeing favicon warnings in my apache log. How do I get rid of those? Do I have to have a favicon for my site? favicon share|improve this question edited Sep 21 at 21:27 asked Nov 24 '10 at 17:30 milesmeow 1,53942241 You probably can send favicon requests away with mod_rewrite, but I'm not skilled enough
Get Http //localhost/favicon.ico 404 (not Found)
to tell you how exactly... –Martin Tóth Nov 24 '10 at 17:40 add a comment| 7 Answers 7 active oldest votes up vote 15 down vote accepted /favicon.ico is one of the artifacts of the Browser Dark Ages (cca 2000). While there is no way to prevent the browser requests, creating a 0-byte file named favicon.ico ends the flow of 404 errors (as the file exists), but no favicon will be shown by the browsers for your site. share|improve this answer answered Dec 1 '10 at 12:34 Piskvor 61.4k38133186 1 Just a word of warning -- IE 9 supposedly may not fire the DOM "content loaded" event when a 0-byte favicon is used. See: groups.google.com/forum/#!topic/my-library-general-discussion/… –Thomas W Sep 16 '14 at 4:15 add a comment| up vote 9 down vote You don't need to, no, but some browsers will request /favicon.ico automatically, so the errors are pretty much unavoidable. share|improve this answer answered Nov 24 '10 at 17:35 Wyatt Anderson 5,71011220 add a comment| up vote 9 down vote Johan Petersson provides a good answer to preventing file not found errors without using a favicon at http://www.trilithium.com/johan/2005/02/no-favicon/ Placing the following code in the Virtual Host section of httpd.conf (or wherever you define your site environment), should stop the errors appearing in the
code: BAK2SKOOL « WordPress Plugin: Authenticate Lite Redirect All Requests for a Nonexistent File to... » Stop the Madness: Redirect those get favicon.ico 404 (not found) Ridiculous Favicon 404 Requests For the last several months, I have
Express Js Disable Favicon
been seeing an increasing number of 404 errors requesting “favicon.ico” appended onto various URLs: https://perishablepress.com/press/favicon.ico https://perishablepress.com/press/2007/06/12/favicon.ico "get /favicon.ico" error (404): "not found" https://perishablepress.com/press/2007/09/25/absolute-horizontal-and-vertical-centering-via-css/favicon.ico https://perishablepress.com/press/2007/08/01/temporary-site-redirect-for-visitors-during-site-updates/favicon.ico https://perishablepress.com/press/2007/01/16/maximum-and-minimum-height-and-width-in-internet-explorer/favicon.ico When these errors first began appearing in the logs several months ago, I didn’t think too much of it -- “just another idiot who can’t http://stackoverflow.com/questions/4269695/do-i-need-to-have-a-favicon-on-my-site-how-do-i-get-rid-of-the-erros-i-see-in-m find my site’s favicon..” As time went on, however, the frequency and variety of these misdirected requests continued to increase. A bit frustrating perhaps, but not serious enough to justify immediate action. After all, what’s the worst that can happen? The idiot might actually find the blasted thing? Wouldn’t that be nice.. But no, the 404 https://perishablepress.com/block-favicon-url-404-requests/ favicon errors just won’t go away. Last week, as I was digging through my site’s error logs, there were hundreds of these infamous favicon requests -- line after line of moronic URL activity, scripted directory brachiation targeting the all-empowering favicon exploit. Give me a break. Finally, I just couldn’t deal with it any more and decided to put an end to the madness.. Pssst: it’s in the root directory Fortunately, stopping this nonsense is relatively easy. My knee-jerk reaction was to simply block all requests for favicon.ico:
are not at a level where making one is easy and I'd rather have the default icon than an ugly one, thank you very much.When Internet Explorer introduced favicons, it regrettably used fixed http://www.trilithium.com/johan/2005/02/no-favicon/ location probing to detect the presence of page icons. Other browsers have since adopted the feature, and if my server logs are any indication Firefox is even more obsessive-compulsive about them than IE. Nearly every browser visit will be associated with requests for favicon.ico, which translates into a lot of requests on a busy site.What does this mean for sites without favicons? For each and every one of those requests Apache will look not found for the file favicon.ico, find that it still does not exist, and return a 404 Not Found error page. If you use custom error documents (a user-friendly thing to do), that page could very well be several kilobytes in size and will not be seen by the visitor. A further annoyance is that the aforementioned failed file-finding attempt will clutter up the error log with reams of "File does not exist" errors.You can favicon.ico 404 (not get rid of the unnecessary processing and traffic as well as the error log entries by using the following Apache configuration incantations: # Don't bother looking for favicon.ico Redirect 404 /favicon.ico # Don't bother sending the custom error page for favicon.ico