How to properly use ICO format icons in your website
An ICO file is an image file format used for computer icons in Microsoft Windows. ICO files contain one or more small images at multiple sizes and color depths, such that they can be scaled appropriately.
Example ICO icon (Google favicon shown here)
ICO files typically appear in browser tabs, bookmarks, and when websites are saved to the desktop.
The most common use of ICO icons is as a favicon for your website. Place this code in the <head>
section of your HTML:
<link rel="icon" href="/favicon.ico" type="image/x-icon">
Implementation Notes:
favicon.ico
file should be placed in your website's root directory/favicon.ico
even without this tagFor better control across different devices and contexts, you can specify multiple icon formats:
<!-- Basic ICO favicon --> <link rel="icon" href="/favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"> <!-- High resolution icons --> <link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"> <link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"> <!-- Apple Touch Icon --> <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"> <!-- Windows 8/10 Tile Icon --> <meta name="msapplication-TileImage" content="/mstile-144x144.png">
Note: While ICO is the traditional format, modern browsers also support PNG for favicons. The ICO format remains important for backward compatibility.
Always place your favicon.ico
file in the root directory of your website. This ensures:
Your ICO file should include these standard sizes for different use cases:
ICO format has excellent browser support across all platforms:
Browser | Support | Notes |
---|---|---|
Chrome | Yes | Full support |
Firefox | Yes | Full support |
Safari | Yes | Full support |
Edge | Yes | Full support |
Internet Explorer | Yes | Version 5+ |
Opera | Yes | Full support |
Pro Tip: While ICO is universally supported, modern browsers also support PNG favicons. For best results, provide both formats.
If your icon isn't appearing:
favicon.ico
and placed in the root directoryFor crisp icons:
When changing your favicon:
favicon.ico?v=2
)