Smartlab Software logo

How To Add a favicon to your Website

Adding a favicon is to your website is easy to do. Many times, though, all the browsers do not see it.

Favicon in all browsers

Put the favicon.ico in the root directory. Add the following between the head tags:

 <link rel="icon" type="image/ico" href="favicon.ico">
<!--[if IE]>
<link rel="shortcut icon" href="/favicon.ico" type="image/">

Using both of these statements insures the icon shows up in all browsers.

The original Microsoft specification used "shortcut icon" which does not conform to the rel attribute.


If the favicon does not show up in your browser, try these tips:

  • Refresh the page
  • Clear your cache
  • If you have a shortcut to your site remove it (before you clear you cache) then revisit the site and bookmark it again (if you had it bookmarked before). Sometimes IE will not update a favicon on a site that is in the cache and occasionally even just having the site in your bookmarks can prevent IE from updating it.