I need to put favicon.ico outside the root of the web site. Can i place it in another path or it may penalize some old browser?
If you're a web page webmaster and cannot get the favicon. ico to display, make sure the icon is in the root directory with the proper permissions.
If you only want one favicon for your entire domain, simply save the favicon. ico file to the root folder of your site. When uploaded, it must be accessible from http://www.yourdomain.com/favicon.ico . As soon as you upload the file, your browser should start displaying the icon for all pages on your site.
To add a favicon to your website, either save your favicon image to the root directory of your webserver, or create a folder in the root directory called images, and save your favicon image in this folder. A common name for a favicon image is "favicon.ico".
If you put favicon.ico
in another directory and declare it in the HTML (eg. <link rel="shortcut icon" href="/icon/favicon.ico">
), the favicon will work, including on IE5, the first browser to support favicons. However, you will encounter the following (minor) drawbacks:
/favicon.ico
no matter what. Expect some 404 errors in your HTTP server logs.favicon.ico
even if you also declare high resolution PNG favicon pictures. Of course, if you only use favicon.ico
as the favicon picture, this is not a concern.In general, this is a good practice to put all favicon-related file in the root directory of the web site. See http://realfavicongenerator.net/faq#why_icons_in_root for more information (full disclosure: I am the author of this page).
Some browsers will always check for favicon.ico in the root folder. Won't break anything if absent, though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With